-
|
To revert a branch to a previous push, run these steps on the command line after copying the commit hash of the push you want to undo (can be found on gibhub under the commits section): |
Beta Was this translation helpful? Give feedback.
Answered by
swith005
May 21, 2025
Replies: 1 comment
-
make sure you're on the branch you want to revertgit checkout revert the merge commit (replace with the actual hash found github)git revert -m 1 # -m 1 tells Git to keep the mainline (usually the branch you merged into push the changegit push origin |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
swith005
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
make sure you're on the branch you want to revert
git checkout
revert the merge commit (replace with the actual hash found github)
git revert -m 1 # -m 1 tells Git to keep the mainline (usually the branch you merged into
push the change
git push origin