Re: RFC: perhaps a "new file" should not be deleted by "git reset --hard"
- From
Elijah Newren <newren@gmail.com>
- Date
- Sep 11, 2008, 16:32 UTC
- Message-ID
- <51419b2c0809110932r4e8c833fx740ccb0c8e46f0af@mail.gmail.com>
- In-Reply-To
- <eafc0afe0809102305u6de85ef3ib2c08004dea8d6f9@mail.gmail.com>
On Thu, Sep 11, 2008 at 12:05 AM, Changsheng Jiang <jiangzuoyan@gmail.com> wrote:
> I don't know what version of you git, my git with version 1.5.4.5 > doesn't delete the file file42 after git-reset.
He stated the same with his version. The point wasn't the behavior of git reset, but of git reset --hard.
> BTW, if you added the file42 to .gitignore, why git-status still > reported "new file" file42"?
>From the gitignore(5) manpage:
"Note that all the gitignore files really concern only files that are not already tracked by git; in order to ignore uncommitted changes in already tracked files, please refer to..."
Once you run git add, the file is tracked (unless you do something to explicitly stop tracking it).
Hope that helps, Elijah