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

Feature request: git cp

From
Martin Guy <martinwguy@gmail.com>
Date
Nov 20, 2025, 14:56 UTC
Message-ID
<CAL4-wQrgD3nnW2BfNf6e9d7tDANE60dYBRRP_0FW3Z-LvQrZmg@mail.gmail.com>

I am splitting a large source file into three smaller ones (mp3.c into mad.c, lame.c and twolame.c) and would like the history to track the relevant lines in each file, like "git mv" does, but I only seem able to do this with one file by "git mv"ing it and copying that to the other as a new file.

So what I'd like is "git cp" that is like "git mv" but where blame for both the resulting files goes back the original one, if that's possible and unless there's a way to achieve the same effect that I haven't figured out.

A fairly rare thing to wish to do, but may be useful in this case.
    M
Next: Kristoffer Haugsbakk
Message 1 of 10 in “Feature request: git cp”
  1. Martin GuyNov 20, 2025
  2. Kristoffer HaugsbakkNov 20, 2025
  3. D. Ben KnobleNov 20, 2025
  4. Martin GuyNov 20, 2025
  5. D. Ben KnobleNov 20, 2025
  6. Lucas Seiki OshiroNov 20, 2025
  7. Martin GuyNov 20, 2025
  8. rsbecker@nexbridge.comNov 21, 2025
  9. Martin GuyNov 21, 2025
  10. Lucas Seiki OshiroNov 21, 2025

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.