-
-
Notifications
You must be signed in to change notification settings - Fork 125
Rename your repo to maple and the default branch to main
On 10/22/22 around 4PM EDT, @alexjball renamed the repo from advocacy-maps
to maple
to reflect the current project, and renamed the default master
branch to main
(rationale).
Github now redirects the old repo name and default branch to the new ones, so things should continue to work, but you should perform the steps below to update your fork and local clone. These instructions assume origin
points to your fork and upstream
points to the codeforboston repo, as in the setup instructions. You can check by running remote -vv
.
Git Documentation:
- Remove the existing
main
branch on your fork:
git push -d origin main
git branch -d main
-
In the settings for your repo (https://github.com/YOUR_USERNAME/advocacy-maps/settings), rename your repository to
maple
-
In the branch settings for your repo (https://github.com/YOUR_USERNAME/advocacy-maps/settings/branches), rename your default branch to
main
-
Update your local clone to use the new names:
# Use the new repo names in your remote urls
git remote set-url origin https://github.com/YOUR_USERNAME/maple.git
git remote set-url upstream https://github.com/codeforboston/maple.git
# Move off of master
git checkout -b renaming
# Rename your local master branch
git branch -m master main
# Connect your local main branch to your fork
git fetch origin
git branch -u origin/main main
git remote set-head origin -a
# Checkout your main branch
git checkout main
- In the future, when you need to pull in code, you'll use
main
instead ofmaster
:
git checkout main
git pull upstream main