Re: How to rebase one branch of the merge commit?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On zo, 2015-02-01 at 19:42 +0100, Hans Ginzel wrote:
> Hello!
> 
> Suppose following git history:
> 
> A–M–C
>   /
> B
> 
> How to achieve this with commits metadata preserving?
> 
> A–M'–C'
>   /
> B'
> 
> I did
> 
> git checkout B
> git add something_not_in_other_commits
> git commit --amend
> 
> So I have B'. How to continue, please? My git version is 1.7.1 (Centos 6.5).

Assuming you have a branch pointing to C and no uncommitted changes:

1) git checkout branch-that-points-to-c
2) git rev-parse branch-that-point-to-c
3) git reset --hard A
4) git merge B'
5) git cherry-pick sha1-that-was-the-output-of-step-2

-- 
Dennis Kaarsemaker
www.kaarsemaker.net

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]