MaterialZ
MaterialZ

Reputation: 351

How to ignore one file when having multiple files with same names

My folder tree looks as follows:

I'm trying to ignore only the file1.py that outside the secondary_folder.
Already tried both ./file1.py and main_folder/file1.py and !secondary_folder/file1.py but in all cases it includes both files.

Upvotes: 0

Views: 93

Answers (1)

phd
phd

Reputation: 94453

Ignore /file1.py. The leading slash means "the directory where the .gitignore resides".

Upvotes: 2

Related Questions