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

How to use branches?

Donn Hardy August 11, 2015

I feel like I'm missing something very obvious.  I have a master branch.  I can create new branches and make changes in them.  I can commit and push those changes.  My problem is that those changes always seem to go into every branch.  There's never a need to merge because the master branch already has the changes.  Could someone explain the basic workflow for creating a branch, making changes in only the new branch, and then merging those changes to the main branch?

2 answers

2 votes
Seth
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 11, 2015

After you create a branch, you need to check it out. You can double-click the branch name in the left panel, or right-click the branch name and choose "Checkout <branchname>..."

1 vote
Johannes Kilian
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 11, 2015

You also can checkout the newly created branch directly on creation via a SourceTree Option:

2015-08-12_06-36-13.png

Within my setting it's default: each time I create a branch, SourceTree immediately switches to the new branch, so I can start working at it immediately ...

Switching to another branch (like your master branch) you have to checkout your branch as @Seth Foss describes

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events