I’ve been using a local git repository interacting with my group’s CVS repository for several months, now. I’ve made an almost neurotic number of branches, most of which have thankfully merged back into my trunk. But naming is starting to become an issue. If I have a task easily named with a simple label, but I accomplish it in three stages which each include their own branch and merge situation, then I can repeat the branch name each time, but that makes the history a little confusing. If I get more specific in the names, with a separate description for each stage, then the branch names start to get long and unwieldy.
I did learn looking through old threads here that I could start naming branches with a / in the name, i.e., topic/task, or something like that. I may start doing that and seeing if it helps keep things better organized.
What are some best practices for naming git branches?
Edit:
Nobody has actually suggested any naming conventions.
I do delete branches when I’m done with them. I just happen to have several around due to management constantly adjusting my priorities. 🙂
As an example of why I might need more than one branch on a task, suppose I need to commit the first discrete milestone in the task to the group’s CVS repository. At that point, due to my imperfect interaction with CVS, I would perform that commit and then kill that branch. (I’ve seen too much weirdness interacting with CVS if I try to continue to use the same branch at that point.)