In Bitbucket, what is an "active" branch, what is the impact of many "active" branches?
Asked Answered
I

3

7

Our (small) team works on Bitbucket for VC. At the time of writing this, our repo has 1550 branches, and we have many (~150) "active" branches. My question is about these "active" branches.

The number of "active" branches has been creeping upward over the last few years. In reality, we never have more than ~5 branches being actively worked on at any given time. Our branches are nearly always merged back into master after a PR review, or rejected from Bitbucket's web PR interface.

I understand git's concept of "active", but I can't find any info in Bitbucket's docs that explain to me:

  • what is an "active" branch is in Bitbucket's context/paradigm?
  • why is it significant to Bitbucket to distinguish between "active" and other branches?
  • is a feature branch is still "active" if it is merged into master?
  • what impact, if any, is there on our repo / CI server (we use Bamboo) from having many "active" branches at once?

I'd appreciate answers to these questions!

The last point about CI / Bamboo is what's really driving this. We get a lot of very crytpic error and failure messages from Bamboo, and they sometimes reference "active branches", but don't include any actionable info (I don't have any currently available to reference, sorry! 😖)

I've browsed Bitbucket's docs / help pages (like https://confluence.atlassian.com/bitbucket/manage-unmerged-branches-389778602.html) and SO, but haven't been able to find (or possibly understand) what Bitbucket considers an "active" branch, and if there's any impact from many active branches (and, if so, what impact).

Innerdirected answered 26/8, 2019 at 17:19 Comment(0)
L
9

It looks like in Bitbucket, the active branches are all branches ahead of the master branch.

That's just it, it has nothing to do with the date of the last commit on the branch.

It is Bitbucket-specific terminology used for filtering branches:

enter image description here

Lye answered 22/3, 2021 at 11:4 Comment(0)
B
1

In git, a branch is very lightweight: it is essentially just a file containing the hash of a commit. Sure, that commit in turn points to parents, all the way back. And those (and the objects referenced) do take up space, and will make operations slower. But git was designed (and is carefully being tuned) for the Linux kernel, with it's furious pace of development. So I'd forget about this.

As always: If in doubt, measure. For instance, set up a clone of the repository, delete all inactive/useless branches (don't worry if you overdo it, this is just an experiment), pack the result and benchmark some typical operations (a day's worth of work, perhaps?) against both. Check disk usage, while you are at it.

Bridgettbridgette answered 26/8, 2019 at 17:31 Comment(2)
this is consistent with my current knowledge of git branches. My question is specific to Bitbucket and the impact on CI (Bamboo) of having many "active" branches. I've added the "Bamboo" and "continuous-integration" tags to help clarify the scope of my question.Innerdirected
@SterlingVix, I'd guess that depends on the branches considered by the "continuous integration" machinery. Presumably branches that haven't seen activity are just ignored. Perhaps you should ask the people in charge.Bridgettbridgette
M
0

Maybe it is similar to GitHub which states:

Active branches: The Active view shows all branches that anyone has committed to within the last three months, ordered by the branches with the most recent commits first.

See Github documentation


btw: If someone is looking for the git definition of active:

... for 'active branches' as branches that have not been merged in remote...

Minuscule answered 25/5, 2020 at 13:17 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.