top | item 45772653

(no title)

r1cka | 4 months ago

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.

discuss

order

morkalork|4 months ago

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

jasonjmcghee|4 months ago

This. Linear has the one click or shortcut to grab the generated branch name based on the ticket.

With GitHub setup properly, on PR open, it auto comments the link to the ticket and links to the pr in the ticket.

wara23arish|4 months ago

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

ytreister|4 months ago

That is what gibr does, it helps you do this with ease

alkonaut|4 months ago

having feature/username/id-desc is good though. Because at least you can identify why the branch is there. That they are ephemeral doesn't mean that people actually clean them up...

delusional|4 months ago

Either it has commits I care about or it doesn't. Either way, I'm not going to consult the branch name.

If it has commits I care about, then it stays. If it doesn't, It goes. I'm only deleting on the server afterall, people can just push it back.

ytreister|4 months ago

Exactly, people tend to leave messes. It makes it much easier to know what the branch was for and have more piece of mind when you want to delete it.

loevborg|4 months ago

Correct, I use uuids as branch names, to the chagrin of my teammates

brettgriffin|4 months ago

This would infuriate me. You have to index that guid to something yourself. Why wouldn't you at least give yourself some help (your name, issue number, type of change, area of project, etc). Why make your job harder than it needs to be?

ytreister|4 months ago

Why would you do this!!!!!

aizk|4 months ago

Great point

focom|4 months ago

Commit message should be ephemeral too. Squashing after a PR should be the default. Only at that moment does the PR/Commit message matter.

bavent|4 months ago

Hard disagree here. GitHub does encourage this sort of thing, but even there for my PRs to be easily reviewable, I like to keep my commits organized and with good messages explaining things. That way the reviewer can walk the commits, and see why each thing was thing was done.

I also like it for myself, when I’m going over my own PRs before asking for a review - I will often amend commits to ensure the work is broken down correctly, each thing that should go together, does.

In a way, stacked PRs are just a higher-level abstraction of this too - same idea, keep work that goes together in the same place.

xorcist|4 months ago

Did you mean before the PR? Why would anyone have a review system if you change the code after review?

Hopefully the commits are already squashed and rebased before review to value reviewers' time.