Answers for "git reset current branch to commit"

5

git reset to commit

# reset to specefic commit
git reset --hard <commit id>

# to go back one step 
git reset --hard HEAD~1

# note: use --soft to keep file changes
Posted by: Guest on March-05-2021
4

how to reset git branch to a certain commit.

git revert --no-commit 0766c053..HEAD
git commit
Posted by: Guest on April-18-2020

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language