r-lib / pkgbuild

Find tools needed to build R packages
https://pkgbuild.r-lib.org
Other
66 stars 35 forks source link

Move `master` branch to `main` #119

Closed jennybc closed 2 years ago

jennybc commented 3 years ago

The master branch of this repository will soon be renamed to main, as part of a coordinated change across several GitHub organizations (including, but not limited to: tidyverse, r-lib, tidymodels, and sol-eng). We anticipate this will happen by the end of September 2021.

That will be preceded by a release of the usethis package, which will gain some functionality around detecting and adapting to a renamed default branch. There will also be a blog post at the time of this master --> main change.

The purpose of this issue is to:

message id: euphoric_snowdog

jennybc commented 3 years ago

I have moved the default branch from master to main here (and elsewhere)!

When I ran usethis::git_default_branch_rename(), I saw this output, which might require some follow-up:

✓ Default branch of the source repo 'r-lib/pkgbuild' has moved: 'master' --> 'main'
• Be sure to update files that refer to the default branch by name.
  Consider searching within your project for 'master'.
x These GitHub Action files don't mention the new default branch 'main':
  - '.github/workflows/R-CMD-check.yaml'
  - '.github/workflows/test-coverage.yaml'
x Some badges may refer to the old default branch 'master':
  - 'README.md'
✓ Default branch of local repo has moved: 'master' --> 'main'

As a result, I won't close this issue, but rest assured that the default branch has been renamed.

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. Anyone with an existing fork or clone 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).

message id: goofy_chipmunk

gaborcsardi commented 2 years ago

Seems like there isn't anything to do here:

~/works/pkgbuild main
❯ ag master

~/works/pkgbuild main
jennybc commented 2 years ago

When I did the master --> main switch, I had to work in a local clone. And if I already had the repo locally, I didn't necessarily pull, because I figured that would cause me more grief, looping over hundreds of repos. But obviously that meant that sometimes my "fishy file" reporting was based on outdated source and reported some false positives. That's probably what happened here.