DEV Community

Krishna  Damaraju
Krishna Damaraju

Posted on

Let the branch name do all the talking in git

I like and use BEM for CSS, it clearly says all about the code and saves time for developers. And I badly wanted something for git as well. I don’t generally delete all the merged branches, I keep some branches which have huge or major code changes/enhancements. So when I look back at them after some time I want to understand what I did in that branch long ago. I am lazy to go through the code or commit message and want my branch name do the story telling about the work I did in that branch.

So, I did a small research and able to construct a beginner naming convention for git branches. You can find it here

https://medium.com/small-things/let-the-branch-name-do-all-the-talking-in-git-e614ff85aa30

Top comments (2)

Collapse
 
michaelhonan profile image
Michael

I personally find it a lot easier to include the JIRA ticket as the prefix, that way you can see the branches that are related to the ticket right from the terminal.

E.g.

ACC682-FormSubmissionBug

If I'm the only one working on the branch/ticket. I'll append "-MICHAEL" to the end of the branch name.

Personal preference I suppose, but I love being able to type "ACC682" then pressing Tab to see the branches related to the ticket.

Collapse
 
sarathsantoshdamaraju profile image
Krishna Damaraju

Wow, great to know.