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

Re: Merging commits together into a super-commit

From
Llinux@horizon.com <linux@horizon.com>
Date
May 10, 2007, 21:55 UTC
Message-ID
<20070510215515.3084.qmail@science.horizon.com>
Er... why is everyone making this so complex?

git checkout trunk # Switch to "trunk" git checkout branch . # Overwrite with "branch", but stay on "trunk" git commit

Now branch is the same tree object as "branch", but without the history.
Of course, you could be even nastier and di a direct
git-commit-tree branch^{tree} -p HEAD < commit_message
But that's not really necessary.

Starting from the branch, using the high-level commands is a bit awkward, but it's easy enough to:

git-update-ref HEAD trunk git-commit

Next: Alex Riesen
Message 1 of 4 in “Re: Merging commits together into a super-commit”
  1. linux@horizon.comMay 10, 2007
  2. Alex RiesenMay 11, 2007
  3. Merging commits together into a super-commitEugine Kosenko, May 11, 2007
  4. Jan HudecMay 12, 2007

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.