luator
Include Page | ||||
---|---|---|---|---|
|
...
install with
Code Block language none npm install -g github-default-branch
run with
Code Block language none github-default-branch --pat <github_access_token> --repo <github_username>/branch-renaming-test
Once complete, all local clones will need to run the following to update their
master
branch to be connected toorigin/main
From the directory for the local clone…Code Block language none git checkout master git pull git -m master main
NOTE:
git fetch
is not sufficient. You need to usegit pull
for this to work.
Checklist:
- renames master to main
- branch dropdown defaults to main
- master is not in the branch dropdown
- Settings → Branches
- main is the default branch
- branch rules were copied over to main
- master branch is not in the branch dropdown under Default branch
- master branch is not listed in the Branch protection rules area
- updates issues
- changes reference to a sha in master to the same sha in main
- changes links to code in master branch to the same code in main (NOTE: Even though the link text and URL were not changed, GitHub forwards all 404 to the default branch which is main.)
- updates PRs
- updates 'commit into' branch to main for all PRs (NOTE:
- updates links to code in master branch to the same code in main (NOTE: Even though the link text and URL were not changed, GitHub forwards all 404 to the default branch which is main.)
- wiki updated
- updates links to code in master branch to the same code in main (NOTE: Even though the link text and URL were not changed, GitHub forwards all 404 to the default branch which is main.)
- local git repo
- updates to local master tracking origin/master to local main tracking origin/main
- updates branches based on origin/master to origin/main
- updates branches based on local master to local main
- in second repo, updates pin to master sha in the repo having the branch renamed
- working with Forks
- TBD
...