Reputation: 35400
I would like to exclude .DS_Store
tracking from myfolder and all subfolders. I also want to exclude a .project
file from myfolder (but not from its subfolders).
What should I write in .gitignore (situated in myfolder)?
.DS_Store # or *.DS_Store ? I mean, is the asterisk necessary?
./.project # is this syntax correct?
Upvotes: 3
Views: 2091
Reputation: 31574
This should do the trick:
.DS_Store
/.project
When you a provide a path to .gitignore, it applies it based on where the .gitignore file is (a chroot, if you will). So the / on the second line means only ignore the myfolder/.project
file.
Upvotes: 5