Last active
July 28, 2022 13:04
-
-
Save jhoblitt/6bb4305e0b548e8e0de9 to your computer and use it in GitHub Desktop.
Demo of needing to re-revert in order to "undo" a previous revert of a merge commit
This file contains 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
export GIT_EDITOR=true | |
mkdir revert-test | |
cd revert-test | |
git init | |
echo "hello world" > README.md | |
git add README.md | |
git commit -m "initial commit" | |
git checkout -b feature/now_with_caps | |
echo "HELLO WORLD" > README.md | |
git add README.md | |
git commit -m "capitalize hello statement" | |
git checkout master | |
git merge feature/now_with_caps --no-ff | |
git checkout -b maint/remove_caps | |
git revert -m1 HEAD | |
git checkout master | |
git merge maint/remove_caps --no-ff | |
git checkout feature/now_with_caps | |
git rebase master | |
git checkout master | |
git merge feature/now_with_caps --no-ff |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment