Reputation: 16166
Most hg
commands allow you to pass a -Xfilename
argument to exclude a file that doesn't belong on your ignore list. Is there a way to do this with git
?
I've got a script that's checking if there are any changes to the working copy, using git status
, but I'd like it to exclude changes to itself.
Upvotes: 0
Views: 228
Reputation: 949
You can temporarily ignore the file with the help of
git update-index --assume-unchanged <file>
Upvotes: 1
Reputation: 13999
No. But if you're doing this in a script, then you can pipe git status
to grep -v
or similar.
Upvotes: 1