Basic question about Crucible workflow and git branch strategy

We're planning our migration from ClearCase/ClearQuest (!) to the Atlassian stack (except Stash, which is coming soon) and git. I have a basic question about how folks manage the number of branches that proliferate in the main repository when using Crucible. That is, we do our development on Issue-named branches. My understanding is the developer has to commit and push their branch to the master repo in order for Fisheye/Crucible to see it and present it to a reviewer. In response to code reviews, the developer has to commit and push a new change set on that branch to the master repo, for the reviewer to see the reworked code.

So over time it seems there will be many branches that appear in the Crucible commit graph browser - one per issue with possibly multiple commits per branch. For us there will be hundreds per year. And each one might have multiple commit events.

So I'm wondering how other customers clean up their git histories or otherwise handle this. Do you get rid of old branches (with git push origin --delete branch_name)? Do you automate that? Or is there a more elegant way to keep old branches from showing up in Crucible? Maybe this is more of a git question but it seems the Crucible model forces branches to be pushed and not remain local to the developer.

Michelle

1 answer

1 accepted

This widget could not be displayed.

So I'm wondering how other customers clean up their git histories or otherwise handle this. Do you get rid of old branches (with git push origin --delete branch_name)? Do you automate that?

Hi Michelle,

In my opinion that's largely up to the team and the procedures/policy the team likes to follow. The Confluence team for example uses issue branches and cleans them up regularly. We've automated that using Bamboo and the Bamboo jobs deletes all branches:

a) that have been fully merged into the main line branch (so no commit is lost)

b) where the last commit is more than 30 days ago (so presumably the developer who was working on that branch has no intention of adding more changesets to that branch.

Logging those deletions allows us to recreate a branch if necessary.

Hope this helps.

Cheers,

Stefan

Thanks so much -- just hearing how an expert team does it is very helpful. I didn't know Bamboo can do that -- that's great.

Michelle

Hi Michelle,

Bamboo currently doesn't do that out of the box. We currently use a custom plugin to achieve that but you could achieve the same with a script that executes git commands.

HTH,

Stefan

Michelle we are tracking this improvement request for Bamboo here. Please watch the issue and vote for it :)

@Stefan - what is that plugin you're talking about? Is it the "issue-driven-development" plugin, or something different?

Yes, that's the one.

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Published Jul 30, 2018 in Confluence

How Manon Soubies-Camy uses Confluence + Trello to organize webinar notes and her knitting stash

@Manon Soubies-Camy is an engineer who has been an avid Atlassian user since 2014. She helps companies of all sizes transform the way they work with the Atlassian stack, including Jira and Confl...

866 views 8 13
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you