1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-04-27 05:18:28 -04:00

add set-head command to rename master post

This commit is contained in:
Jake Jarvis 2020-06-29 12:13:02 -04:00
parent 84add157d3
commit b6cbb737c9
Signed by: jake
GPG Key ID: 2B0C9CF251E69A39

View File

@ -39,12 +39,15 @@ git branch -m master main
### 2. Push the new branch to GitHub:
This one should be familiar. `-u` sets the new branch as the default locally at the same time.
The first command should be familiar. `-u` sets the new branch as the local default at the same time, and the second line ensures our local `HEAD` points to our new branch on GitHub.
```bash {linenos=false}
git push -u origin main
git remote set-head origin main
```
You can verify this worked by running `git branch -r`. You should see something like `origin/HEAD -> origin/main`.
### 3. Change the default branch in your repository's settings:
Setting the default branch remotely is the only step that can't be done on the command line (although you can technically [use the GitHub API](https://github.com/erbridge/github-branch-renamer)). Head to **Settings → Branches** on GitHub to [change the default branch](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/changing-the-base-branch-of-a-pull-request).
@ -83,6 +86,6 @@ git config --global alias.new '!git init && git symbolic-ref HEAD refs/heads/mai
---
This may be a small gesture, but anything we can do to make even one more volunteer feel more welcome in the OSS community will **always** be worth the extra 10 to 15 minutes of inconvenience on my end. ✊🏾
This may be a small gesture, but anything we can do to make even one more volunteer feel more welcome in the OSS community will _always_ be worth the extra 10 to 15 minutes of inconvenience on my end. ✊🏾
And while we're at it, Nat... **It's time to finally [#DropICE](https://github.com/drop-ice/dear-github-2.0).** 🧊