r-debug icon indicating copy to clipboard operation
r-debug copied to clipboard

Rename default branch to main

Open schloerke opened this issue 2 years ago • 1 comments

Taken from https://github.com/rstudio/shiny/issues/3502#issuecomment-953318300

We're ready to rename master to main here (and elsewhere)!

This blog post announces the larger effort and explains how contributors can update their local environments:

Renaming the default branch

Here's the TL;DR:

  1. Update usethis (you want usethis v2.1.2 or higher):
    install.packages("usethis")
    
  2. Someone with admin permissions on this repo needs to do the renaming, as I do not have the power:
    usethis::git_default_branch_rename()
    
    If you wish, you can read the documentation for git_default_branch_rename(). Or do the equivalent from the command line and in the browser (see the blog post).
  3. All remaining contributors can adjust to the renamed default branch with:
    usethis::git_default_branch_rediscover()
    
    If you wish, you can read the documentation for git_default_branch_rediscover(). Or do the command line equivalent (see the blog post).

schloerke avatar Nov 02 '21 17:11 schloerke

"latest" could be an alternative: builds on GHA use the branch name as a default tag by default.

krlmlr avatar Jun 04 '23 17:06 krlmlr