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

Re: duplicate commits after git rebase -i HEAD~10

From
GGGavin Guo <tuffkidtt@gmail.com>
Date
Dec 14, 2010, 16:07 UTC
Message-ID
<AANLkTimSAjHOc42LOwkbFxqGEKrR0sOTcZB_mA2Ttj09@mail.gmail.com>
In-Reply-To
<20101203153435.GA6069@sigill.intra.peff.net>
The first one:
>  git checkout master
>  git reset --hard HEAD^
>  git merge your-branch
The second:
>  git checkout tmp-branch M^
>  git merge your-branch
>  git rebase --onto tmp-branch M master
>  git branch -d tmp-branch

I don't exactly know what the difference between the two methods to solve the duplicate problem. Why if there is already a built under master need to use the second solution? It seems the same to me to solve the problem.

Gavin Guo
Previous: Jeff King
Message 3 of 3 in “duplicate commits after git rebase -i HEAD~10”
  1. Mathieu MalaterreDec 3, 2010
  2. Jeff KingDec 3, 2010
  3. Gavin GuoDec 14, 2010

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.