It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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

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 Jun 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
Community showcase
Published in Sourcetree

Sourcetree for Windows - CVE-2019-11582 - Remote Code Execution vulnerability

A vulnerability has been published today in regards to Sourcetree for Windows.  The goal of this article is to give you a summary of information we have gathered from Atlassian Community as a st...

4,999 views 0 12
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you