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

Re: gitignore design

From
Jakub Narebski <jnareb@gmail.com>
Date
Jul 29, 2011, 12:57 UTC
Message-ID
<m3tya5qm86.fsf@localhost.localdomain>
In-Reply-To
<1311943481799-6633412.post@n2.nabble.com>
llucianf <llucianf@gmail.com> writes:
> im sure cvs doesnt require you to remove files from repo in order to ignore
> them. i used cvs for years and its ingonre policy is simple and effective.
> you just put the files/patterns into ignore file and things happen aka they
> are ignored.
_Untracked_ files are ignored.  Tracked files are not, even with CVS.
  $ echo file2.txt >>.cvsignore
  $ echo "3 line"  >>file2.txt
Now 'cvs status' shows file as 
  File: file2.txt         Status: Locally Modified
and 'cvs diff' shows changes.
CVS 1.11.19
[And damn, how hard it was to check this in CVS as compared to
 checking similar things with Git].
> with this very intelligent git this simple thing is not so simple. of course
> there are workarounds (like the template example you gave) but they are
> clumsy.
They are correct and better solutions than ignoring changes.

Ignoring changes to tracked files is much more rare than having broad ignore file, and tracking some files that match ignore patterns (but note that you must use "git add --force" to add/track ignored file).

> im just trying to understand why git ignore mechanism cant just read the
> .gitignore file and obey to those ignore rules without asking you to do
> fancy voodoo operations such removing those files from repo.

Please read carefully: I mentioned 'ASSUME-UNCHANGED' mechanism in both of my posts, haven't I?

-- 
Jakub Narębski
Previous: llucianfNext: Ferry Huberts
Message 8 of 20 in “gitignore design”
  1. llucianfJul 29, 2011
  2. Ferry HubertsJul 29, 2011
  3. llucianfJul 29, 2011
  4. Ferry HubertsJul 29, 2011
  5. llucianfJul 29, 2011
  6. Jakub NarebskiJul 29, 2011
  7. llucianfJul 29, 2011
  8. Jakub NarebskiJul 29, 2011
  9. Ferry HubertsJul 29, 2011
  10. Jakub NarebskiJul 29, 2011
  11. Johannes SixtJul 29, 2011
  12. Jakub NarebskiJul 29, 2011
  13. Johannes SixtJul 29, 2011
  14. Jakub NarebskiJul 29, 2011
  15. Nguyen Thai Ngoc DuyJul 30, 2011
  16. Piotr KrukowieckiJul 30, 2011
  17. Nguyen Thai Ngoc DuyJul 30, 2011
  18. Piotr KrukowieckiJul 30, 2011
  19. Clemens BuchacherJul 30, 2011
  20. Philip OakleyJul 29, 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.