Re: Git commit won't add an untracked file given on the command line
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Nov 19, 2008, 01:07 UTC
- Message-ID
- <alpine.DEB.1.00.0811190206170.30769@pacific.mpi-cbg.de>
- In-Reply-To
- <20081118214730.005fc72d@crow>
Hi,
On Tue, 18 Nov 2008, Mark Burton wrote:
Show 9 quoted lines
> Hi Francis, > > > You must "git add .gitignore" first. And yes, this is by design. > > Err, that's a bit odd isn't it because "git add" stages the content into > the index but the whole point of specifying files on the command line to > "git commit" is to commit the changes in the specified files while > ignoring what's currently in the index (so says the man page for > commit).
It may be a traditional wart, but a helpful one. Remember, you can also say:
git commit that/directory/
I do _not_ want Git to add all untracked (and unignored) files in that directory automatically.
Ciao, Dscho