Hello, I have a situation where I need to maintain files that are highly categorized. Basically I am using BitBucket to store Test scripts related to multiple modules, this how it looks on a high level:
Now my issue comes where I need to further categorize many test scripts that I would like to maintain under these branches:
Suppose I have 5 different functionalities and I have written 5 test scripts. Each of the functionality is independent of each other, but comes under the same module. Therefore I will somehow have to keep the test scripts under the same repository, but still need to have a kind of separation. Because I do not want to pull all the remaining 9 test scripts if I wanted to modify one of them (This occurs if I keep all 10 test scripts under the same module branch).
Therefore I would like to create branches inside a branch to avoid checking out all other scripts. But when I did create a branch inside a branch, in BitBucket UI if I navigate to the base branch and list all the branches, even the sub-branches are listed, this will lead to a lot of confusion :(
Here is a pictorial representation of my issue:
Is there anyway I could make the sub-branch (Acceleration-Student-March-2020) not come up if I list the branches being in the repository? Or is there any better way to have a further 'separation' between objects stored under the same branch?
Hello @Shantharam , welcome to the Community!
Git doesn't really have a concept of sub-branches.
You could look at git tags as a way to further organize your work: https://www.atlassian.com/git/tutorials/inspecting-a-repository/git-tag
Right now, all of your branches will show up in that dropdown if they have been pushed up to Bitbucket.
Hi @Shantharam ,
Yes, you can create sub-branches to any branch.
Lets say you have a master branch then from the master branch you can create a sub-branch.
You can further create sub-branches from this child branch.
Here are the steps:
First, go to your repository then choose Branches. On the top right corner, there will be a button with a name Create branch. Click on this button.
Now choose your child branch as from branch and enter the name of your new branch.
Finally you will have following hierarchy:
-> GrandChildBranch and so on.
You can create any new branch from any existing branch, tag, commit, etc.
Hope it will help.
Kindly accept this answer if it resolves your query.
Yes, It is possible to create a sub-branch in bitbucket. Even you can create branch to n level.
Let's say you have a master branch in any repository. Now you can create a child branch from existing master branch.
Here are the steps -
Now you will see the following window:
From branch: Choose the branch from which you want to create your new branch
Branch name: Enter the name of your new branch.
and click on the create button.
Now you have 2 branches in your repository.
Again repeat the same steps and this time choose your child branch in From branch and enter a new branch name. And you will get a sub-branch.
You can create sub-branches to any level. You can also create a branch from any commit, tag, etc.
Hope it will help.
Kindly accept this answer if this works for you.
Hey everyone, over the past year, we've added several new features to how you can use Bitbucket and Jira together. We'd love to know how you'll are using the integration and how it's helping your tea...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events