Last active
June 17, 2020 20:20
-
-
Save blimmer/a7bf33cad9262f01a37be3aba35d881b to your computer and use it in GitHub Desktop.
Revisions
-
blimmer revised this gist
Jun 17, 2020 . 1 changed file with 1 addition and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -11,6 +11,4 @@ git fetch git checkout main git pull origin main delete_branch=$(git branch -D master) || true -
blimmer revised this gist
Jun 17, 2020 . 1 changed file with 4 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -10,4 +10,7 @@ fi git fetch git checkout main git pull origin main # this might fail if the `master` branch has already been deleted set +e git branch -D master -
blimmer revised this gist
Jun 17, 2020 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -10,4 +10,4 @@ fi git fetch git checkout main git pull origin main git branch -D master || true -
blimmer revised this gist
Jun 17, 2020 . 1 changed file with 3 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -7,9 +7,7 @@ if ! git diff-index --quiet HEAD --; then exit 1 fi git fetch git checkout main git pull origin main git branch -D master -
blimmer created this gist
Jun 17, 2020 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,15 @@ #! /bin/bash set -e if ! git diff-index --quiet HEAD --; then echo "ERROR: you have uncommited changes. Please stash or commit before running this script." exit 1 fi git checkout master git branch -m master main git fetch git branch --unset-upstream git branch -u origin/main git symbolic-ref refs/remotes/origin/HEAD refs/remotes/origin/main