You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
I would like to know how I can change a branch after merging it with the main branch so that it appears in the 'Merged Branches' filter and not in 'Active branches'
Despite creating a pull request or performing a direct merge, the merged branch always remains in the 'Active branch' filter and I want it to only be visible from 'Merged branches' once merged, but I can't find a solution
I appreciate the information you can provide me.
Hi @Juan Sebastian Marin and welcome to the community!
Any branch that shares history with the repository's main branch but is ahead of the repository's main branch by some commits that are not yet present within the main branch, is considered an active branch. If you merge branchA into the main branch with a merge commit, then branchA should move to Merged branches.
@Theodora Boudale Essentially your software is forcing users to use Fast Foward or delete branches to be able to organize branches in any meaningful way.
Is there any way to override what counts as active or perhaps organize by git tag?
This is extremely frustrating, since we're forced to delete branches that may have valuable information or deal with uncertainty regarding which branches are still active
Hi Ahmad and welcome to the community.
I'm afraid that there is no way to override what counts as an active branch or organize by tags. It is possible to filter by branch type (next to the Active branches filter) if you use certain prefixes for your branches. These prefixes can be configured by admins in the page Repository settings > Branching model.
What merge strategy do you use? Using the merge commit strategy will also make the branch appear in Merged branches. However, if you use the Squash strategy, the branch will still show as Active.
Yes, I'm aware the Squash strategy will still show as Active. That's what my point is here.
I'm aware I can filter by prefixes and can set those in the Branching model.
However that creates an issue where branches have to constantly be renamed and their may be a disconnect with local versions.
Currently we have to rely on tags, which works okay enough, but still creates disparities with local versions of the repo if users aren't regularly pruning & fetching tags.
We have a feature request to show branches merged with the Squash strategy in the Merged branches:
Since you'd be interested in that, I would suggest adding your vote to that request (by selecting the Vote for this issue link) as the number of votes helps the development team and product managers better understand the demand for new features.
You are more than welcome to leave any feedback, and you can also add yourself as a watcher (by selecting the Start watching this issue link) if you'd like to get notified via email on updates.
Implementation of features is done as per our policy here and any updates will be posted in the feature request.
@Theodora Boudale My interest is not in seeing which branches are merged.
As I mentioned above, my interest is in filtering out branches that haven't been merged or haven't been modified in a while.
The only affect displaying squash merge branches in "merged", while not excluding them from active does, is make both useless. If all of my branches are in both "active" and "merged" (regardless of what branches they were merged into), then neither have any relevant meaning (which is the OP's original point).
If I want to see which branches are merged, I have several better ways I can already do that. Notably looking at old PRs targeting specific branches, searching for merge commits, etc....
This is one of the reasons to use squash merges in the first place. The majority (usually only) commits on the development branches and main branches, are all merges, making it easy for me to track the actual state of my environments through time.
I'm not asking for a future solution that may be implemented (which BCLOUD-22398 isn't either) , I'm asking if there is a current solution that I am not aware of. It seems the answer is no, there isn't an existing solutions to this issue, which is fine.
I'm sorry if my previous replies were not clear. Indeed, at the moment there is no way of filtering out branches that haven't been merged yet to the repo's main branch if you use the squash merge strategy.
The feature request concerns showing branches merged with Squash in Merged branches instead of Active, which I why I shared it.