Create document in repo for branch and PR naming conventions #5877
Replies: 6 comments 12 replies
-
I like and usually try to following this recommendation since everything makes sense to me, would be curious to see what others think. https://hackernoon.com/git-branch-naming-convention-7-best-practices-to-follow-1c2l33g2 |
Beta Was this translation helpful? Give feedback.
-
I've started using worktrees lately. Using a slash as a separator in the branch name is inconvenient there since git will take the last component of the path as the new branch name. So a prefix like "feature/" or "bug/" will become part of the path but not the branch name. |
Beta Was this translation helpful? Give feedback.
-
So, would underscore be a better separator, @petertgiles ? i.e
|
Beta Was this translation helpful? Give feedback.
-
I remember addressing this question once, a long time ago, and as far as I remember the conclusion was that the "label" (feature, bug, bugfix, etc) didn't add any useful information, and was kind of redundant anyway, since most of our branches are feature branches. My vote is to stick with |
Beta Was this translation helpful? Give feedback.
-
how about a convention for PR titles? i like:
what do other @GCTC-NTGC/developers like? |
Beta Was this translation helpful? Give feedback.
-
Okay, I'm going to make a call on these! Here are our new conventions: Branch names: |
Beta Was this translation helpful? Give feedback.
-
An anonymous card was on the retro board this week: "Create document in repo for branch and PR naming conventions".
As far as I know there is no definitive convention on the team for this. This issue will require some discussion and consensus building.
Note 1: Brinda started a discussion on this topic on Slack a long time ago: https://talent-cloud.slack.com/archives/C0259G6KXJ6/p1638818249035500
Note 2: The pattern of using a forward slash in the branch name allows folding in gitlens:
Note 3: (TODO: Something about starting with the issue number allows auto complete?)
Beta Was this translation helpful? Give feedback.
All reactions