how to go back to previous version of git code example
Example 1: how to return to latest version on git
// we need to type both of them git fetch origin git reset --hard origin/master
Example 2: git go back to previous commit
git checkout 12feg3435 #commit ID
Example 3: git command change to previous comit
git checkout <commit_id>
git checkout -b <new branch> <commit_id>
git checkout HEAD~X // x is the number of commits t go back