Answers for "git checkout previous commits"

6

how to see previous git commits

$ git log
# git log lists the commits made in that repository in reverse chronological order
Posted by: Guest on March-01-2022
0

git checkout previous commit

git reset --hard HEAD~10
To rollback 10 commits back:
Posted by: Guest on October-30-2020
0

git checkout previous commit

$ git reset --hard <commit_id>
Posted by: Guest on April-19-2021

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language