Reputation: 183
I'm new to the world of git, and also to Atlassian
and SourceTree
, so I've very basic about this.
What I want achieve is that:
Suppose that I've a branch called master
, which I develop my application with all new features and bugfix, and another branch called release
, what I want to do is merge all the content of the master
branch, to ther release
branch.
What I did so far:
Selected the master
branch on the branches
view on the left of SourceTree
Clicked on the join
button on the header of SourceTree
and then on Ok
.
Clicked on the Send
button on the header of SourceTree
.
After the step 3, nothing happen, in my BitBucket
repository I doesn't see any Release
branch, I've actually created this branch on SourceTree
only. Someone could tell me what am I doing wrong?
Thanks.
Upvotes: 6
Views: 15498
Reputation: 295
Follow this step-by-step process:
MERGE ONE BRANCH INTO ANOTHER
Branch B is new branch and we want want branch A code in B
Ok
>> <<
You have A changes in B
Upvotes: 1
Reputation: 18939
To me, it sounds like you're not pushing the correct (or all) branches to BitBucket. Here is a complete example of how it's done:
Let's assume you have a repository with two branches: master and release. You do development on the master branch and only do releases on the release branch. It will then look something like this:
When you want to merge the master branch into the release branch you checkout the release branch (right click on it and choose Checkout release...). Then right-click on the branch you want to merge into the release branch (master) and choose Merge master into current branch. The result is this:
You now have to push the changes to BitBucket. Click on the Push button in the toolbar. The following dialog will pop up:
You now have to choose the branches you want to push. If you don't push a branch it will not end up on BitBucket. In this case, I want both my branches to be there so I'll tick both the Push? checkboxes. On BitBucket it will now look like this on the Branches page:
You will also see the remote branches in SourceTree under the remotes dropdown.
What you're most likely doing wrong is that you're not pushing the release branch to BitBucket.
Upvotes: 14