Re: gitignore design
- From
Jakub Narebski <jnareb@gmail.com>
- Date
- Jul 29, 2011, 12:27 UTC
- Message-ID
- <m3y5zhqnlv.fsf@localhost.localdomain>
- In-Reply-To
- <1311941774976-6633332.post@n2.nabble.com>
llucianf <llucianf@gmail.com> writes:
> is not a contradiction. i need project files into repo so whenever i clone > the project on diff machine i need them there. > but during development i dont need them to be 'taken into account' by git.
The usual solution is to put _template_ under version control (for example <projfile>.sample), and have build system create initial custom version during first build. Local project file is untracked and ignored, and project file template is tracked.
> the purpose of this topic is for me to understand why git dont use the > simple cvs approach on this matter.
Are you sure that is how CVS does it? Because from what I read in CVS manual, CVS and Git approach to ignore files are the same wrt. already tracked files.
> why i cant just enumerate some files into .gitignore file and have git > simply ignore them without removing them from repo?
There is assume-unchanged mechanism... which is _explicitely_ mentioned in "Notes" section of gitignore(7) manpage. RTFM, please.
-- Jakub Narębski