move master commit to branch code example Example: move branch to a commit git checkout master git reset --hard 1258f0d0aae