Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

I don't see "Development" as a branch type. What should I do?

Gerald Britton February 19, 2019

For  a new project based on an existing system, I probably did this the wrong way.  

 

1. Created a new repo, which created a new master branch (it is labeled as the default)

2. put a placeholder file in the master branch

3. Branched master to release

4. Populated release from current system

 

Now, I want to create a development branch, then merge the current release branch into it.  The types listed are

 

Bugfix, Feature, Hotfix, Release and Custom.

 

Seeing that I figure I may have messed up creating the release branch. still learning!  Is it possible to set my release branch type to Release?  Then, when I create a Development branch, which type from the list above should I choose?

I'd like to wind up with master as the Default branch, Develop as the Base branch

2 answers

0 votes
Gerald Britton February 19, 2019

Right so if branch x is of type bugfix, e.g. can I change it to type feature, or one of the others?

Mikael Sandberg
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 19, 2019

Yes, all you would have to do is rename the branch. The way we do it is we remove the branch in Bitbucket, do a local fetch, rename the branch and push it back to Bitbucket.

Gerald Britton February 19, 2019

Yeah renaming makes sense.  Sorry to be a pain.  I'm just trying to see how to change the branch type.  So If I created a branch foobar without a type, then later wanted to call it my bugfix branch, can I do that on rename?  I'll have to try that!

Mikael Sandberg
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 20, 2019

Correct, that can be done with a rename.

Instead of doing what we do by removing the branch in Bitbucket, fetch, and then push you can do the same thing from the command line using these commands:

1. Rename the branch locally

git branch -m foobar bugfix/foobar

 2. Delete the old branch from the remote

git push origin --delete foobar

3. Push the new branch name to remote

git push origin bugfix/foobar 

4. Reset the upstream branch

git push -u origin bugfix/foobar  
0 votes
Mikael Sandberg
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 19, 2019

The branch types is just a way of organizing your branches, see Using branches in Bitbucket Server. If you are using Sourcetree these types will show up as folder under Branches. You can also create your own type by selecting custom and then add your type followed by the branch name like this:

branch_type/my_branch

To create you development branch you can just select Custom type and then just name the branch Develop. Then you can set it as the default branch for the repository.

Gerald Britton February 19, 2019

Ok, so I gather that the branch type is some sort of extended attribute that bitbucket supports?  (Guessing here.)  can that be changed somewhere?

Mikael Sandberg
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 19, 2019

Correct, and it is based on Gitflow Workflow.

Gerald Britton February 19, 2019

So how do you change that extended attribute if you want to?

Mikael Sandberg
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 19, 2019

The ones pre-defined in Bitbucket cannot be changed, your only option is to use the custom option and then manually enter the branch type you want.

Gerald Britton February 19, 2019

Right so if branch x is of type bugfix, e.g. can I change it to type feature, or one of the others

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events