-
Notifications
You must be signed in to change notification settings - Fork 6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change the default branch from "master" to something else #929
Comments
(Untested) script to change the default branch from the command-line using gh: set -e
repo=cli/cli
newbranch=trunk
remote=origin
git fetch "$remote" master
git checkout -b "$newbranch" "${remote}/master" --no-track
git push -u "$remote" "$newbranch"
git remote set-head "$remote" "$newbranch"
# update the default branch
gh api -XPATCH "repos/${repo}" -f default_branch="$newbranch" >/dev/null
# update the base branch of all open pull requests
for num in `gh pr list -B master -L999 | awk '{print $1}'`; do
gh api -XPATCH "repos/${repo}/pulls/${num}" -f base="$newbranch" >/dev/null
done Ref. #909 |
Update! We'll be changing our default branch name to: |
Adding a small task for me to update the soon-to-be broken links in our issues as they would still point to |
This is done! The default branch is now |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Our team would prefer to change our default branch name away from "master", since "master" is a generally problematic term due to its association with slavery in some contexts. (We are aware that "master" as used in git does not necessarily have that connotation, but we do not want to nitpick about etymology here.)
We are considering one of these names for the default branch name:
trunk
,development
, ormain
.TODO:
master
is hardcoded anywheremaster
to new branchmaster
master
branchRef. desktop/desktop#6478
The text was updated successfully, but these errors were encountered: