From: "Philip Oakley" <philipoakley@iee.org>
To: "llucianf" <llucianf@gmail.com>, <git@vger.kernel.org>
Subject: Re: gitignore design
Date: Fri, 29 Jul 2011 17:44:41 +0100 [thread overview]
Message-ID: <295478CF936A4310941CE2001892A2DA@PhilipOakley> (raw)
In-Reply-To: 1311934832699-6632987.post@n2.nabble.com
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@gmail.com>
To: <git@vger.kernel.org>
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@vger.kernel.org
> 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
>
prev parent reply other threads:[~2011-07-29 16:44 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-29 10:20 gitignore design llucianf
2011-07-29 11:51 ` Ferry Huberts
2011-07-29 12:01 ` llucianf
2011-07-29 12:08 ` Ferry Huberts
2011-07-29 12:16 ` llucianf
2011-07-29 12:27 ` Jakub Narebski
2011-07-29 12:44 ` llucianf
2011-07-29 12:57 ` Jakub Narebski
2011-07-29 14:01 ` Ferry Huberts
2011-07-29 12:19 ` Jakub Narebski
2011-07-29 12:58 ` Johannes Sixt
2011-07-29 13:19 ` Jakub Narebski
2011-07-29 13:31 ` Johannes Sixt
2011-07-29 21:39 ` Jakub Narebski
2011-07-30 3:10 ` Nguyen Thai Ngoc Duy
2011-07-30 6:45 ` Piotr Krukowiecki
2011-07-30 13:22 ` Nguyen Thai Ngoc Duy
2011-07-30 15:52 ` Piotr Krukowiecki
2011-07-30 16:01 ` Clemens Buchacher
2011-07-29 16:44 ` Philip Oakley [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=295478CF936A4310941CE2001892A2DA@PhilipOakley \
--to=philipoakley@iee.org \
--cc=git@vger.kernel.org \
--cc=llucianf@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox