How to switch to other branch in Source Tree to commit the code?
Atlassian SourcetreeAtlassian Sourcetree Problem Overview
Recently I have installed Source Tree in my windows machine. How can I use the source tree for commit, merge of code to central repository?? And also how can I switch the branches ?? Can any one kindly provide me the links on how to overcome this??
Atlassian Sourcetree Solutions
Solution 1 - Atlassian Sourcetree
Hi I'm also relatively new but I can give you basic help.
- To switch to another branch use "Checkout". Just click on your branch and then on the button "checkout" at the top.
UPDATE 12.01.2016:
The bold line is the current branch.
You can also just double click a branch to use checkout.
- Your first answer I think depends on the repository you use (like github or bitbucket). Maybe the "Show hosted repository"-Button can help you (Left panel, bottom, right button = database with cog)
And here some helpful links:
Solution 2 - Atlassian Sourcetree
- Go to the log view (to be able to go here go to View -> log view).
- Double click on the line with the branch label stating that branch. Automatically, it will switch branch. (A prompt will dropdown and say switching branch.)
- If you have two or more branches on the same line, it will ask you via prompt which branch you want to switch. Choose the specific branch from the dropdown and click ok.
To determine which branch you are now on, look at the side bar, under BRANCHES, you are in the branch that is in BOLD LETTERS.