Re: duplicate commits after git rebase -i HEAD~10
- From
- Gavin 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