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"
- Host: GitHub
- URL: https://github.com/bnb/remained
- Owner: bnb
- License: mit
- Created: 2021-04-21T22:19:18.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2021-04-22T18:02:12.000Z (about 5 years ago)
- Last Synced: 2025-04-14T12:03:30.800Z (about 1 year ago)
- Language: JavaScript
- Size: 7.81 KB
- Stars: 10
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
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
```