Like I am working on a project and created 4 branches related to some iOS issue. Now after a month or so when i go back and check what i was doing on the related branch i can't remember as all of them seems similar.
I have read a post related to this on SO but can't find it now.
In Git you can add description to the branch using
git branch --edit-description
git config branch.<branchName>.description ## To read description
Please note, this will maintain the description in local repository it will not be sync'ed to remote server. It is helpful for branch maintainer but rest of the team may not access it automatically. You can refer to : htps://github.com/ejmr/git-branch-notes also.
Proper naming convention to your branch is important we are following this rule.
Task/Issue Id-Some description of Task/Issue
So it will be like 251-Add-tags-functionality-to-customer so it will be easy for us figure out which task or issue its referring to and you will also get some context about issue itself via description.
Naming would definitely help jeffkreeftmeijer.com/git-flow is a convention [actually very close to something] that I use.
I'd also recommend deleting merged branches, specially when they are done doing their original intended task. In our projects feature branches tend to stick around for a while (then they start becoming hotfixing, then they start developing other features, then they start hotfixing the other feature, and the cycle goes on).
The most important way is to use good naming. On top of this a lot of project management tools can assign tickets to branches, that way you can see for each ticket which branch it's related to.
In order to remember what a branch was for, you should give it a good name! I usually use git flow, so I have branches, like
master
develop
feature/skydome
feature/quest-system
feature/magic-system
hotfix/issue-123
hotfix/double-jump
As you can see, you can even use your issue tracker to maintain a detailed description and just name the branch in a way that makes it obvious where to look.
Ben Buchanan (200ok)
I make some bits of the web.
As the other posts say prevention is best - use a branch naming system, ideally linking work to an issue/ticket number. It saves a lot of hassle.
For the ones you already have you might be able to jog your memory by running
git login each branch or diffing the branches against master.