make previous commit master code example Example: make previous commit master git checkout master git reset --hard