Re: how to omit rename file when commit
- From
Frank Li <lznuaa@gmail.com>
- Date
- Jan 19, 2009, 09:35 UTC
- Message-ID
- <1976ea660901190135k71087673p85e995878e539a8f@mail.gmail.com>
- In-Reply-To
- <7v63kbr6zc.fsf@gitster.siamese.dyndns.org>
For example: there are 2 file. a.c and e.c I modify e.c. and git mv a.c b.c
git update-index e.c
I just want to commit e.c and don't commit rename(a.c -> b.c)
I am debuging a tortoisegit. at commit dialog, there will be show all changed as [x] rename (a.c => b.c) [x] modify (e.c) button [OK]
assume user uncheck rename []rename (a.c=>b.c) [x]modify (e.c)
then click okay.
I don't know use which git command to handle this case. if git mv b.c a.c, local working copy will be changed.
2009/1/19 Junio C Hamano <gitster@pobox.com>:
Show 19 quoted lines
> "Frank Li" <lznuaa@gmail.com> writes: > >> For example there are a file a.c at git repository. >> use >> git mv a.c b.c >> >> git status: >> # On branch master >> # Changes to be committed: >> # (use "git reset HEAD <file>..." to unstage) >> # >> # renamed: a.c -> b.c >> >> If we don't want to stage this change at this commit, what can I do? > > I may be misunderstanding what you want to do, but wouldn't "git mv b.c > a.c" undo whatever you did? > >