Open jennybc opened 3 years ago
GitHub's support for default branch renaming means that, in general, pull requests that target the default branch will be correctly re-targetted.
However, there are some edge cases, where this is not true. Some pull requests are automatically closed when the default branch is renamed and they cannot be re-opened. This happens when the PR-making branch, fork, or user no longer exists. (Literally, it appears to boil down to whether HEAD
of the PR branch is available for whatever behind-the-scenes magic is happening.)
There are 2 open pull requests in this repo that are at risk of auto-closing:
A way to "rescue" the work on such a PR is described in https://github.com/isaacs/github/issues/168#issuecomment-374201226. Here's the TL;DR:
If there is a PR displaying unknown repository after the fork was deleted, and you want to resurrect that PR, simply type:
git fetch origin refs/pull/123/head:foo
substituting (if necessary)
origin
for the remote pointing at the target repo, 123 for the PR number, andfoo
for the name of the local branch you want created to point to the head of the PR.Then you can simply
git checkout foo
... and resubmit a new one ....
message id: hardhearted_newt
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:
Here's the TL;DR:
install.packages("usethis")
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).
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: amused_halibut
Cc @schloerke
The
master
branch of this repository will soon be renamed tomain
, 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: entire_lizard