https://github.com/srid/master
Dethrone "main" and restore "master" to its rightful glory.
https://github.com/srid/master
Last synced: 4 months ago
JSON representation
Dethrone "main" and restore "master" to its rightful glory.
- Host: GitHub
- URL: https://github.com/srid/master
- Owner: srid
- License: gpl-3.0
- Created: 2025-10-03T20:15:26.000Z (9 months ago)
- Default Branch: master
- Last Pushed: 2025-10-03T20:36:20.000Z (9 months ago)
- Last Synced: 2025-10-11T02:35:08.644Z (8 months ago)
- Language: Shell
- Size: 16.6 KB
- Stars: 5
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# master
Dethrone "main" and restore "master" to its rightful glory.
## About
A script that [unwoke](https://srid.ca/unwoke)'ifies the default branch by renaming it from "main" to "master".
## Prerequisites
- [Nix with flakes enabled](https://nixos.asia/en/install)
- (Or, run `script.sh` directly)
- GitHub CLI (`gh`) authenticated with appropriate permissions
- Run `nix run nixpkgs#gh auth login`
## Usage
```bash
nix run github:srid/master --
```
The script will:
1. Check if the repository's default branch is "main"
2. If not, exit (nothing to do)
3. If yes, clone the repository
4. Rename the branch from "main" to "master"
5. Push the new branch
6. Update the repository's default branch setting
7. Delete the old one
## Example
```bash
nix run github:srid/master -- https://github.com/yourname/yourrepo
```
## License
See LICENSE file for details.