Basic question about Crucible workflow and git branch strategy

Michelle Eshow August 21, 2012

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

0 votes
Answer accepted
Stefan Saasen
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 22, 2012

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

Michelle Eshow August 22, 2012

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

Stefan Saasen
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 22, 2012

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

James Dumay
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 6, 2013

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

PiotrA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 6, 2013

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

Stefan Saasen
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 7, 2013

Yes, that's the one.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events