Last active
June 26, 2021 14:14
-
-
Save tonkatsu7/5992c2cc3be9e36c7f6b43f162115831 to your computer and use it in GitHub Desktop.
Remediating diverged branch by abort merge undoing fetched changes and renaming local branch
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
# abort merge with diverged remote branch | |
git merge --abort | |
# https://stackoverflow.com/questions/6591213/how-do-i-rename-a-local-git-branch | |
# rename local branch | |
git branch -m tutorial | |
# https://stackoverflow.com/questions/35591887/how-to-undo-git-fetch | |
# discard fetched changes | |
git remote remove origin | |
# reattach origin | |
git remote add origin <URI> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment