The master branch of this repository will soon be renamed from master to main, as part of a coordinated change across the USGS-R and USGS-VIZLAB organizations. 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 will make this change early in the week of February 6, 2022. 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 rather than wait for us to do it, 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
- Navigate to your project's working directory.
- Double-check that you have git credentials set up for HTTPS by running
usethis::gh_token_help(). 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. The PAT must have at least "repo" scope. 
- Rename default branches locally and on all remote repositories at once with
usethis::git_default_branch_rename(). For more details see here.

- Verify that the work was successful by running
usethis::git_default_branch().
Manual Method
- Go to <your repository> -> Settings -> Branches and edit the default branch from
master to main.
- All members should update their local settings so that new repositories created locally will have the correct default branch:
git config --global init.defaultBranch main.
- All members must update their local settings to match the change to this repository. 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
The
masterbranch of this repository will soon be renamed frommastertomain, as part of a coordinated change across the USGS-R and USGS-VIZLAB organizations. 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 will make this change early in the week of February 6, 2022. 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 rather than wait for us to do it, it can either be done manually or through some convenience functions in the
usethispackage.usethisor the manual method.usethis) or change them yourselves (if using the manual method).usethis::git_default_branch_rediscover()or by steps 2 and 3 of the manual method. Point them to this issue to facilitate the process!Using usethis
Note:
usethismust be version 2.1.2 or higherusethis::gh_token_help(). If you have not yet set up git credentials for HTTPS, you can do so by creating a GitHub PAT and usinggitcreds::gitcreds_set()to register it with git. The PAT must have at least "repo" scope.usethis::git_default_branch_rename(). For more details see here.usethis::git_default_branch().Manual Method
mastertomain.git config --global init.defaultBranch main.usethis::git_default_branch_rediscover()(see above) or else run the following: