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