Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to track history of hotfix branch names when the branch is deleted

Andrew Cumming June 22, 2018

In fost of the workflows I have seen, it looks like when you create a hotfix, you branch off release, fix the bug and merge back to release and probably master. If the branch was named say hotfix-123 becaus that was how you refer to it on your issue tracking system, then when you delete the branch, you lose the name. If you dont delete the branch, you'll end up with a large number of branches that will just be noise for normal work unless you want to refer back to that particular hotfix.

If you delete the branch, how do people track this back to their issue tracking system ? The only way I can see so far would be to either tag the branch and push the tags back to origin, or make sure your initial commit of the branch contained a reference to the hotfix id.

Are there any better alternatives or is this all thats available ?

This assumes the branch is deleted after its been merged. I notice the visual of the branch remains, just the name is removed.

1 answer

1 accepted

0 votes
Answer accepted
Mikael Sandberg
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 22, 2018

Hi Andrew,

Welcome to the Atlassian Community.

The merge commit contains the source branch of your merge, so if the hotfix branch was deleted you can always recreate it using that commit.  You can also use git reflog to restore deleted branches, have a look at How to restore a deleted branch.

We are using both Bitbucket and Jira and track it based on the pull request, so even if the branch has been deleted, we have a record of the merge and all the commits that was part of it.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events