* How to rebase one branch of the merge commit?
@ 2015-02-01 18:42 Hans Ginzel
2015-02-01 19:28 ` Dennis Kaarsemaker
0 siblings, 1 reply; 3+ messages in thread
From: Hans Ginzel @ 2015-02-01 18:42 UTC (permalink / raw)
To: git
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).
Regards
Hans
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: How to rebase one branch of the merge commit?
2015-02-01 18:42 How to rebase one branch of the merge commit? Hans Ginzel
@ 2015-02-01 19:28 ` Dennis Kaarsemaker
2015-02-09 11:38 ` Hans Ginzel
0 siblings, 1 reply; 3+ messages in thread
From: Dennis Kaarsemaker @ 2015-02-01 19:28 UTC (permalink / raw)
To: Hans Ginzel; +Cc: git
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: How to rebase one branch of the merge commit?
2015-02-01 19:28 ` Dennis Kaarsemaker
@ 2015-02-09 11:38 ` Hans Ginzel
0 siblings, 0 replies; 3+ messages in thread
From: Hans Ginzel @ 2015-02-09 11:38 UTC (permalink / raw)
To: Dennis Kaarsemaker; +Cc: git
On Sun, Feb 01, 2015 at 08:28:28PM +0100, Dennis Kaarsemaker wrote:
>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'
This creates a new merge comit (M').
>5) git cherry-pick sha1-that-was-the-output-of-step-2
This does nothing: "Finished one cherry-pick. nothing to commit (working directory clean)"
Thank you, but how to preserve date, message author of the original merge commit (M)
to the new one (M'), please?
Regards,
HG
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-02-09 11:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-01 18:42 How to rebase one branch of the merge commit? Hans Ginzel
2015-02-01 19:28 ` Dennis Kaarsemaker
2015-02-09 11:38 ` Hans Ginzel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).