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