Branching Issue, code not switching

Hi, I have just started SourceTree with BitBucket and I love the product, except for the following issue: I can't seem to be able to switch between branches? I mean, the actual switch is there, I see the highlighting of the different branches, but the code always remains the same?

If I am on my Branch A and switch back to my MASTER branch, I still see all the changes I made in Branch A when I open the project?

This is driving me nuts. Can anyone help out? Oh, I'm developing in C# using Visual Studio if that has something to do with it.

Regards, Bob

3 answers

1 accepted

0 votes
Accepted answer

I don't know how familiar you are with git (I'm assuming you're using git) but if you have uncommitted changes in your current branch you will either need to commit them or stash them (set them aside without adding them to your git db) before switching to a different branch.


You should be able to switch branches by double-clicking the branch you want in the sidebar.  The current branch should turn bold - the highlighting alone does not indicate that you've actualy changed branches.


Double clicking on a commit that is the top of a branch (or using the Checkout button to checkout a commit that is the tip of a branch) should also put you on that branch (but this could be ambiguous if more than one branch pointer points to the commit)

Thanks to both of you for your answers. I am pretty new to GIT indeed. Turns out I had switched branches before committing. Once I had done that, switching between branches worked fine. Thanks a lot!

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 06, 2018 in Bitbucket

Upgrade Best Practices

Hello! My name is Mark Askew and I am a Premier Support Engineer for products Bitbucket Server/Data Center, Fisheye & Crucible. Today, I want to bring the discussion that Jennifer, Matt, and ...

1,909 views 7 10
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you