Last active
April 15, 2023 15:01
-
-
Save neogeogre/ecde6dc6c422ef77a900e4cde3bb99ef to your computer and use it in GitHub Desktop.
revert HEAD to a certain commit point using git commands
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
# https://stackoverflow.com/questions/3380805/checkout-old-commit-and-make-it-a-new-commit | |
# https://gist.github.com/CrookedNumber/8964442?permalink_comment_id=3426850#gistcomment-3426850 | |
git reset --hard 0fee5ad9 | |
git push origin -f | |
# https://stackoverflow.com/questions/7744049/git-how-to-rebase-to-a-specific-commit | |
git rebase --onto <new parent commit hash> <old parent commit hash> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment