how to revert commits from branch git code example Example: move a branch back in git git checkout A git reset --hard B git push --force github