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

Re: Commit to more than one branch at once?

From
SRStefan Richter <stefanr@s5r6.in-berlin.de>
Date
Oct 6, 2006, 19:23 UTC
Message-ID
<4526AD4F.70305@s5r6.in-berlin.de>
In-Reply-To
<BAYC1-PASMTP020F3D66B3E46CDBE82D40AE130@CEZ.ICE>
Sean wrote:
Show 9 quoted lines
> Only merging the branches will make the commit show up in branch B with
> the same SHA1 number (or identity) that it had in branch A.  This is a
> fundamental part of Git.  The sha1 of each commit is based in part on
> the sha1 of its parent.  Thus it's impossible[1] to copy a commit to
> another branch (ie. reparent it) without changing its identity.
> 
> Sean
> 
> [1]  Okay, more or less impossible.. don't ask me do the math.

Ah, I didn't see the wood for the trees. And this dependence of a commit's identity on the history is also a (or the) reason why mergers are necessarily spliced in as commits with unique identity too...

-- 
Stefan Richter
-=====-=-==- =-=- --==-
http://arcgraph.de/sr/
Previous: SeanNext: Petr Baudis
Message 4 of 5 in “Commit to more than one branch at once?”
  1. Stefan RichterOct 6, 2006
  2. Linus TorvaldsOct 6, 2006
  3. SeanOct 6, 2006
  4. Stefan RichterOct 6, 2006
  5. Petr BaudisOct 6, 2006

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.