git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: how to omit rename file when commit

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 19, 2009, 09:16 UTC
Message-ID
<7v63kbr6zc.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<1976ea660901190113l5407f108lff8f37d9a8331f58@mail.gmail.com>
"Frank Li" <lznuaa@gmail.com> writes:
Show 12 quoted lines
> 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?

Previous: Frank LiNext: Frank Li
Message 2 of 5 in “how to omit rename file when commit”
  1. Frank LiJan 19, 2009
  2. Junio C HamanoJan 19, 2009
  3. Frank LiJan 19, 2009
  4. Jakub NarebskiJan 19, 2009
  5. Boyd Stephen Smith Jr.Jan 19, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.