Re: [PATCH] Documentation: enhance gitignore whitelist example
- From
Jonathan Nieder <jrnieder@gmail.com>
- Date
- Apr 5, 2011, 21:41 UTC
- Message-ID
- <20110405214114.GA13729@elie>
- In-Reply-To
- <4D9B8862.1050605@redhat.com>
Eric Blake wrote:
> Yeah, but then you have to 'git add -f path/to/file' them every time you > change them
No, I don't believe that's true.
$ git add -f git.o $ >git.o $ git add git.o
.gitignore only protects against starting to track a file that was previously untracked.
I do tend to use exceptions in .gitignore anyway, since (1) it allows, as a sanity check,
$ git ls-files -i --exclude-standard
and (2) to import from or compare to a tarball, one can do
$ git rm -rf . $ git add .