Skip to content
This repository has been archived by the owner on Jun 1, 2023. It is now read-only.

NOTICE: upcoming default branch name change #112

Open
jesse-ross opened this issue Dec 2, 2021 · 2 comments
Open

NOTICE: upcoming default branch name change #112

jesse-ross opened this issue Dec 2, 2021 · 2 comments
Assignees

Comments

@jesse-ross
Copy link

The master branch of this repository will soon be renamed from master to main, as part of a coordinated change across the USGS-R organization. This is part of a broader effort across the git community to use more inclusive language. For instance, git, GitHub, and GitLab have all changed or are in the process of changing their default branch name.

We anticipate this will happen early in the week of December 13, 2021. The purpose of this issue is to give notification of the change and provide information on how to make it go smoothly.

If you wish to make the change yourself, it can either be done manually or through some convenience functions in the usethis package.

Using usethis

Note: usethis must be version 2.1.2 or higher

  1. Run usethis::git_default_branch_rename()

The screen shot below shows the output of this command in addition to a few other commands. For more details see here.

image

Note that if you have not yet set up git credentials for HTTPS, you can do so by creating a GitHub PAT and using gitcreds::gitcreds_set() to register it with git.

image

Manual Method

  1. Go to -> Settings -> Branches and edit the default branch from master to main.
  2. All members must update their local settings to match this change. They can either do this with usethis::git_default_branch_rediscover (see above) or else run the following:
git branch -m master main
git fetch origin
git branch -u origin/main main
git remote set-head origin -a
@limnoliver
Copy link
Member

Went as expected!

image

@limnoliver
Copy link
Member

limnoliver commented Dec 6, 2021

And github gave nice instructions for how to update your local clone once the change is made:

image

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

No branches or pull requests

2 participants