4 ms·
git checkout name-of-the-correct-branch # grab the last commit to master git cherry-pick master # delete it from master git checkout master git reset
by yxhuvud 9y ago
git checkout name-of-the-correct-branch
# grab the last commit to master
git cherry-pick master
# delete it from master
git checkout master
git reset HEAD~ --hard
The two lines in the middle can be
git cherry-pick -
git checkout -
, and voila, it suddenly is name insensitive.