0

I work on a project that uses git and Atlassian bitbucket. When we merge a feature branch into our develop branch, the feature branch's remote seems to get deleted. But that only seems to happen when we merge into develop - not when we merge into another feature branch. Is the deletion triggered by a setting from within git? Or by a setting in bitbucket?

Woodchuck
  • 3,869
  • 2
  • 39
  • 70
  • It's removed when a pr is merged? Or when pushing a branch? – Julian Jan 14 '20 at 21:32
  • The feature branches seem to get removed upon merge to develop. And we do the merges through the bitbucket interface, which makes me think it's a bitbucket setting. But if so, that setting is well hidden. – Woodchuck Jan 14 '20 at 21:39
  • merge to develop, via a Pull Request? You haven't checked "delete source branch after merge"? See https://confluence.atlassian.com/bitbucketserver/merge-a-pull-request-808488562.html and https://confluence.atlassian.com/bitbucketserver/files/808488562/844498872/1/1472515375700/BBS_049_SCR_merge-option-dropdown_v0.png – Julian Jan 15 '20 at 15:07
  • The "delete source branch after merge" option is not visible to me. Clearly it exists, per the Atlassian link you provide. But maybe it's one of these things where if you don't have authority to change the setting it's not even shown to you (to simplify the UI I guess?). Or our particular bitbucket enterprise version doesn't provide that. Ugh, how confusing. – Woodchuck Feb 12 '20 at 00:32
  • What's the version? – Julian Feb 12 '20 at 00:39
  • Atlassian Bitbucket v5.16.11 – Woodchuck Feb 12 '20 at 01:07

1 Answers1

1

The "delete source branch after merge" option is not visible to me. Clearly it exists, per the Atlassian link you provide.

It sounds this is disabled. Unfortunately I cannot find how they could disable this.

When we merge a feature branch into our develop branch, the feature branch's remote seems to get deleted. But that only seems to happen when we merge into develop - not when we merge into another feature branch. Is the deletion triggered by a setting from within git? Or by a setting in bitbucket?

I guess this is a plugin in Bitbucket then. For example, the plugin PullRequest Workflow has an option to delete branches when the target is a specific branch (range).

enter image description here

But maybe it's one of these things where if you don't have authority to change the setting

Sounds a good question for the Bitbucket admin on your side ;)

Julian
  • 33,915
  • 22
  • 119
  • 174