summaryrefslogtreecommitdiff
path: root/squash-commits.sh
blob: a231ee620c0189796bae401375be4691814ba0c6 (plain)
1
2
3
4
5
6
7
8
9
#!/bin/bash
git checkout --orphan new-master
git add .
git commit -m "$1"
git branch -m master old-master
git branch -m new-master master
git push --force --set-upstream origin master
git branch -D old-master
git push