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

How does git now about future renames during a rebase?

From
Jon Seymour <jon.seymour@gmail.com>
Date
May 6, 2012, 04:11 UTC
Message-ID
<CAH3Anro6o478A41eXcsFU7guOobQXhqq=DdpNpGWgriRVfqcZQ@mail.gmail.com>
I had a history that looked like this:
1. some other commit
2. commit that moves files from one directory to a new directory
3. commit that edits files in the new directory.
I then did an interactive rebase to move the commit 3 before commit 2.
1. some other commit
3a. commit that edits files in the new directory.
2a. commit that moves files from one directory to a new directory

I didn't expect this to work, but somehow git worked out that it needed to apply the change in 3 to the original location of the files.

How does it do this?
jon.,
Next: Jeff King
Message 1 of 2 in “How does git now about future renames during a rebase?”
  1. Jon SeymourMay 6, 2012
  2. Jeff KingMay 6, 2012

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.