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
Right so if branch x is of type bugfix, e.g. can I change it to type feature, or one of the others?
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ok, so I gather that the branch type is some sort of extended attribute that bitbucket supports? (Guessing here.) can that be changed somewhere?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Correct, and it is based on Gitflow Workflow.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So how do you change that extended attribute if you want to?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Right so if branch x is of type bugfix, e.g. can I change it to type feature, or one of the others
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.