←back to thread

35 points Terretta | 6 comments | | HN request time: 0.001s | source | bottom
Show context
r1cka ◴[] No.45772653[source]
I think people worry too much about branch names. Feature branches are usually ephemeral. Prefix your branch with your personal identifier so I know who is primary on it and worry more about the commit message which will live on indefinitely.
replies(5): >>45772677 #>>45773377 #>>45773466 #>>45774133 #>>45774578 #
morkalork ◴[] No.45772677[source]
Yes, please just name the branch after the ticket/issue number so we can all get the context for it and call it a day
replies(3): >>45772963 #>>45773320 #>>45784312 #
wara23arish ◴[] No.45772963[source]
I hate issue numbers for branch names. ISSUE-9482 doesn’t really provide much.

Ticket link should always be included in PR description.

But branch names should be descriptive like terraform_dev_create_instance

etc

replies(3): >>45773128 #>>45773171 #>>45784316 #
6LLvveMx2koXfwn ◴[] No.45773128[source]
we do:

  [feature/bug]/ISSUE-NUMBER-summary-of-issue
e.g.:

  bug/psi-456-broken-args-parsing
replies(2): >>45773179 #>>45784322 #
1. darkwater ◴[] No.45773179[source]
More or less the same here, but we (I?) prefix it with the username as well, so when pulling branches you know who created it.
replies(3): >>45773812 #>>45774594 #>>45784353 #
2. celticninja ◴[] No.45773812[source]
But the PR and git blame can tell you this so I would never look at the Branch name to find out this information
replies(1): >>45775078 #
3. dewey ◴[] No.45774594[source]
A nice benefit of prefixing by your-name/issue-1234-some-description is that many git clients will show it in a folder structure that way and it's easy to differentiate yours from other branches.
4. darkwater ◴[] No.45775078[source]
For me is useful when I run 'git fetch' from the command line. I don't use any graphical git client
5. ytreister ◴[] No.45784353[source]
I added a new TODO issue so that username can be configured in the branch name. gibr currently does not have support for username.

https://github.com/ytreister/gibr/issues/42

replies(1): >>45796744 #
6. ytreister ◴[] No.45796744[source]
I implemented this in version 0.6.0 which was just released. https://github.com/ytreister/gibr/releases/tag/0.6.0 The issue assignee can be used in the branch name.