18 lines
373 B
Bash
18 lines
373 B
Bash
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 dev;
|
|
git push --force;
|
|
|
|
#merge to master
|
|
git checkout -B master origin/master;
|
|
git merge --squash dev;
|
|
git commit -am "$cm";
|
|
git push;
|
|
|
|
#clean dev
|
|
git checkout dev;
|
|
git reset --hard master;
|
|
git push --force;
|