Reputation: 351
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
Reputation: 94453
Ignore /file1.py
. The leading slash means "the directory where the .gitignore
resides".
Upvotes: 2