Created
November 29, 2023 11:51
-
-
Save deepakpk009/b1970a5fff31e3a31ff29a502649a7c4 to your computer and use it in GitHub Desktop.
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
How to reset a branch to a commit: | |
git checkout <branch-name> | |
git reset --hard <commit-hash> | |
git push --force origin <branch-name> | |
Then to check it (it shouldn't print any diff) | |
git diff <branch-name>..origin/<branch-name> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment