From 379714eed72e7bd14d352018798b958d90545dd3 Mon Sep 17 00:00:00 2001 From: Evgeny Zinoviev Date: Wed, 12 Jun 2019 00:05:01 +0300 Subject: initial --- squash-commits.sh | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100755 squash-commits.sh (limited to 'squash-commits.sh') 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 -- cgit v1.2.3