From: Gavin Guo Date: Tue, 14 Dec 2010 16:07:31 GMT Subject: Re: duplicate commits after git rebase -i HEAD~10 Message-ID: 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