diff options
Diffstat (limited to 'squash-commits.sh')
-rwxr-xr-x | squash-commits.sh | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/squash-commits.sh b/squash-commits.sh new file mode 100755 index 0000000..a231ee6 --- /dev/null +++ b/squash-commits.sh @@ -0,0 +1,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 |