The answer is that you can use
git add --force <filename>
to force git to take a copy of the current version of that file and place it
in the staging area, despite it being in the ignore list.
Being *in* the staging area means that that specific version will be copied
into each commit until you ask git to remove that copy (with git rm
<filename> from the staging area, or update that copy, or whatever.
This depends on how (i.e. the options) you add files before a commit, or do
the commit itself, etc. For example the 'git add -A .' option will notice
all the changes, including any updates to your <filename> (which may not be
what you want).
Git is flexible enough to do what you need. It can be hard to see the effect
of all the options especially if someone has shown you a 'magic' command,
but hasn't fully explained the consequences. Many things are only obvious in
retrospect.
Philip Oakley
Scotland
----- Original Message -----
From: "llucianf" <llucianf@xxxxxxxxx>
To: <git@xxxxxxxxxxxxxxx>
Sent: Friday, July 29, 2011 11:20 AM
Subject: gitignore design
why gitignore doesnt simply work like in cvs where if you put something in
the ignore file, those stuff are simply ignored from that point without
having to remove them from repo?
--
View this message in context:
http://git.661346.n2.nabble.com/gitignore-design-tp6632987p6632987.html
Sent from the git mailing list archive at Nabble.com.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________
-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 10.0.1390 / Virus Database: 1518/3793 - Release Date: 07/28/11
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html