DEV Community

Krishna  Damaraju
Krishna Damaraju

Posted on

2

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.

Billboard image

Create up to 10 Postgres Databases on Neon's free plan.

If you're starting a new project, Neon has got your databases covered. No credit cards. No trials. No getting in your way.

Try Neon for Free →

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay