Branch Mover was built by Garrick Aden-Buie. Come say hi to me on Twitter at @grrrck.
This app wouldn't be possible without Jenny Bryan's thoughtful and detailed work. In particular the usethis package and the recently added usethis::git_default_branch_rename() function. Jenny's coordinated efforts to rename the default branches of about 350 of RStudio's open source repositories greatly inspired this app.
If you want to learn more about how git's default branch works and why many are opting to choose a more intentional default, I highly recommend Jenny's detailed article Renaming the default branch, which I'll quote directly:
Technically, Git has no official concept of the default branch. But in practice, most Git repos have an effective default branch. If there’s only one branch, this is it! It is the branch that most bug fixes and features get merged in to. It is the branch you see when you first visit a repo on a site such as GitHub. On a Git remote, it is the branch that
HEAD
points to. The default branch may not be precisely defined in Git itself, but most of us know it when we see it.Historically,
master
has been the most common name for the default branch, butmain
is an increasingly popular choice. There is coordinated change across the Git ecosystem that is making it easier for users to make this switch, for example:
- Regarding Git and Branch Naming, statement from the Git project and the Software Freedom Conservancy regarding the new
init.defaultBranch
configuration option- Renaming the default branch from
master
, GitHub’s roadmap for supporting the shift away frommaster
- The new Git default branch name, same, but for GitLab
Jenny Bryan, Renaming the default branch
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.