Re: Git commit won't add an untracked file given on the command line
- From
- Mark Burton <markb@ordern.com>
- Date
- Nov 18, 2008, 21:47 UTC
- Message-ID
- <20081118214730.005fc72d@crow>
- In-Reply-To
- <200811182227.20076.fge@one2team.com>
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).
Cheers,
Mark