Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename default branch to main #23

Open
schloerke opened this issue Nov 2, 2021 · 1 comment
Open

Rename default branch to main #23

schloerke opened this issue Nov 2, 2021 · 1 comment

Comments

@schloerke
Copy link

Taken from rstudio/shiny#3502 (comment)

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).
@krlmlr
Copy link
Contributor

krlmlr commented Jun 4, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants