Created
January 11, 2013 12:24
-
-
Save lukeredpath/4510308 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
State A (current): | |
branch foo: A -- B -- C -- D | |
\ | |
branch bar: -- E -- F -- G --H | |
I want commit E from bar brought back into foo, without cherry-picking and creating a new commit. Essentially I want to go to this: | |
State B: | |
branch foo: A -- B -- C -- D -- E | |
\ | |
branch bar: F -- G --H |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I think you could just do (from branch
foo
):(where E is the sha reference to E)
This would point that branch at commit E. The history stays intact. This only won't work if you have further commits (not shown) on branch
foo
.