Skip to content

Commit ae971f9

Browse files
committed
For brevity, drop suggestions for naming branches.
Because branch names don't become part of the Git history, the branch names don't really matter. If the branch is named 'potato' but has descriptive commit messages and a pull request that gives reviewers context for the changes, that's not ideal but doesn't really cause that much of a problem.
1 parent b3bc056 commit ae971f9

File tree

1 file changed

+7
-32
lines changed

1 file changed

+7
-32
lines changed

CONTRIBUTING.md

Lines changed: 7 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -27,45 +27,20 @@ and [this book’s style guide][tspl-style].
2727
[forum]: https://forums.swift.org/c/development/swift-docc/80
2828
[tspl-style]: /Style.md
2929

30-
## Creating a feature branch
30+
## Working on a feature branch
3131

3232
If this is your first contribution,
3333
start by making a fork of the Git repository.
3434

3535
In your fork,
36-
make a new branch off of `main`.
37-
Some suggested branch-naming practices include the following:
38-
39-
- Include numbers like a GitHub issue or Swift Evolution proposal number,
40-
to make it easy to go back from the branch to that issue or SE proposal.
41-
However, put the numbers at the end of the branch name,
42-
to avoid interfering with autocompletion.
43-
You're more likely to remember the English word the branch name starts with
44-
than to remember the numbers.
45-
46-
- Prefer underscores (`_`) between words instead of hyphens (`-`).
47-
Many editing environments consider hyphens to be word separators,
48-
so using underscores makes makes it easier to select the branch name
49-
by double-clicking or another editor command to select a whole word.
50-
51-
- Avoid overly long branch names.
52-
You can usually describe what a branch is for in a few words.
53-
Remember that a branch name doesn't need to stand alone:
54-
the commits on that branch help explain its purpose,
55-
and during review the pull request provides more context.
56-
57-
Note that branch names are ephemeral:
58-
When your branch is merged,
59-
the merge commit includes information like
60-
the name of the pull request and its number,
61-
but not the name of the merged branch or the name of the fork.
62-
Make sure the branch name isn't the only place you write a piece of information.
63-
For example,
64-
when you fix a GitHub issue,
65-
include a "Fixes" line in the description of your pull request.
36+
make a new branch starting at `main`
37+
with a brief, descriptive name.
38+
Branch names are ephemeral:
39+
When a pull request is merged,
40+
the merge commit doesn’t include name of your feature branch.
6641

6742
If you need to incorporate changes from `main` or resolve a merge conflict,
68-
merge that branch into your feature branch.
43+
merge `main` into your feature branch.
6944
Before creating a pull request,
7045
you can instead rebase your feature branch onto `main` if you prefer,
7146
but don't rebase commits that are part of a pull request.

0 commit comments

Comments
 (0)