move a branch back in git

Shell
git checkout A
git reset --hard B
git push --force github

Source

Also in Shell: