commit to the wrong branch what to do
Arne Babenhauserheide
arne_bab at web.de
Fri Sep 2 10:51:35 UTC 2016
Andreas Tscharner writes:
> On 01.09.2016 11:16, Uwe Brauer wrote:
>> Most likely this sometimes happens:
>> I added, removed, edited and then commit, but alas to the wrong branch.
>> What is the most efficient way to solve this issue?
>
> I would have taken
> hg graft
> and afterwards deleted/reverted the commit on the wrong branch
>
> hg help graft:
> copy changes from other branches onto the current branch
That’s what I recently did, too:
$ hg update right_branch
$ hg graft -r <REV>
$ hg update wrong_branch
$ hg backout -r <REV>
and then to avoid having to do it again:
$ hg update right_branch
:)
Best wishes,
Arne
More information about the Mercurial
mailing list