An open API service indexing awesome lists of open source software.

https://github.com/bnb/remained

shortcut tool to run the commands that GitHub suggests when you change from "master" to "main"
https://github.com/bnb/remained

Last synced: about 1 year ago
JSON representation

shortcut tool to run the commands that GitHub suggests when you change from "master" to "main"

Awesome Lists containing this project

README

          

# remained

A tiny tool to do all the _local_ steps GitHub tells you to do once you've change your default branch name from `master` to `main`.

## Usage

First, you'll want to change your upstream [default branch's name in GitHub](https://docs.github.com/en/enterprise-server@3.0/github/administering-a-repository/changing-the-default-branch).

Next, just run this commmand (assuming you already have Node.js installed):

```
npx remained
```

## What does remained do?

Remained runs the following commmands, which are the same commands that GitHub tells you to run when you rename your default branch:

```sh
git branch -m master main
git fetch origin
git branch -u origin/main main
git remote set-head origin -a
```