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

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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jun 12, 2018 in Bitbucket

Do you use any Atlassian products for your personal projects?

After spinning my wheels trying to get organized enough to write a book for National Novel Writing Month (NaNoWriMo) I took my affinity for Atlassian products from my work life and decided to tr...

188 views 20 8
Join discussion

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