read -p "Commit message? " cm; git fetch --all; #copy dev to history to ensure we don't lose changes if something goes wrong git checkout history; git reset --hard qual; git push --force; #merge to master git checkout -B prod origin/master; git merge --squash qual; git commit -am "$cm"; git push; #clean dev git checkout qual; git reset --hard prod; git push --force; git reset --hard origin/qual;