git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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 .
Previous: Eric BlakeNext: Eric Blake
Message 5 of 9 in “Documentation: enhance gitignore whitelist example”
  1. Documentation: enhance gitignore whitelist exampleEric Blake, Apr 5, 2011
  2. Jonathan NiederApr 5, 2011
  3. Johannes SixtApr 5, 2011
  4. Eric BlakeApr 5, 2011
  5. Jonathan NiederApr 5, 2011
  6. Eric BlakeApr 5, 2011
  7. Junio C HamanoApr 5, 2011
  8. Junio C HamanoApr 5, 2011
  9. Junio C HamanoApr 5, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.