git go back to latest commit 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: after checking out a previous commit go back to latest commit
git checkout <commit hash> # go to previous commit
git revert <commit hash> # revert action of going to previous commit
Example 3: git go back to previous commit
git checkout 12feg3435 #commit ID