Created
April 24, 2023 21:19
-
-
Save anthonydahanne/c0bea4ff0fe6525b499eb0bfeca6a545 to your computer and use it in GitHub Desktop.
Github has disabled force-push to the main branch; except that sometimes, that can come in handy. Use this gist with care ❤️
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 characters
git checkout -b other-main | |
git push origin other-main | |
gh api -XPATCH "repos/pivotal-cf/tanzu-bellsoft-liberica" -f default_branch="other-main" >/dev/null | |
git push --delete tanzu main | |
gh api "repos/pivotal-cf/tanzu-bellsoft-liberica/branches/other-main/rename" -f new_name="main" >/dev/null | |
git checkout main | |
git pull origin main |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment