Samvera Community Wiki
Effectiveness of Tool: GitHub native rename - Samvera Branch Renaming Working Group
Summary of Observations
Renaming in GitHub does not change localhost, links to master from wiki pages, issues, or PR comments.
Renaming in GitHub does change branch name, branch settings, PR base branch.
Renaming a branch other than master that is in a PR waiting to merge into another branch, closes the PR.
Once renamed, instructions are provided for renaming at localhost. Once those are cleared, I couldn't find a way to get them back. I tried renaming another branch, but they still were not shown again.
Once master is renamed, a user can push master to the repo again. There were no settings in Settings → Branches → add rule, that would prevent the master branch from being created again in the repo.
Setup
Create a test repo with a master branch, issues, PRs - See samvera-labs/branch-renaming-wg for a script to do this. This script sets up conditions in the test repo:
Default branch is master
add branch settings for master branch under Settings → Branches
Conditions to set up manually:
Within the test repo, create a wiki page that references a branch in master. -- link in Home page accessed from Wiki in header menuCreate a Fork of the test repo. -- samvera-labs/branch-renaming-test-1Clone the test repo to your local machine.Clone the Fork to your local machine.Create a second repo with a pin in the Gemfile to a master sha in the repo having the branch renamed -- N/A The test app is not setup as a gem.
Tool: gitHub-default-branch
Reference:
Renaming the default branch from master (official GitHub documentation)
Usage:
navigate to the test repo in github (e.g. YOUR_GITHUB_USERNAME/branch-renaming-test)
click branches link
click pencil icon beside
masterbranchset name to
main
Checklist:
main.)main.)main.)main.)after following instructions for updating local git repo
after rename in parent, fork default branch is also renamed -- NO -- the default branch continues to be master, but there is a note telling you that the default branch was renamed to main in the source repo.
Rename non-master branch:
renamed.)renamed.)Additional areas not tested
automated builds and deployments that reference master branch
building images that aren't from tags but from branches
Jenkins
Ansible
other tooling that references master branch
git aliases
local shell scripts
maintenance scripts for github API
git reflow or other 3rd party tools
Integrations
Github hooks, coveralls, code climate, hound, circleci
mirroring with other sources (e.g. gitlab mirroring github)
notifications to tools (e.g. slack integration)
documentation (eg. raw.github.com URLs)
samvera.github.io
samvera.org
github pages for the project
Contributing
references to master in code
Gemfile pins
To possible JSON documents in Github repos
forks
Within "usual" contributors
Other "users"
In particular, Browse Everything has utility outside of Samvera's adopters