OMFG GIT REBASE

Situation:

[origin/branch1]  [branch1]  some commit message
[origin/branch2]  [branch2]  another commit message

git checkout branch1
git rebase branch2

oops...

[origin/branch1]  some commit message
[origin/branch2]  [branch2]  [branch1]   another commit message

to undo this:

git checkout branch1
git fetch origin
git reset --hard origin/branch1


No comments: