user2377141
user2377141

Reputation: 132

GIT Why do I seem to be on two branches at once?

I'm having quite an issue with my repository...

It seems that I'm on several branches at once and I can't figure out why.

Here's a screenshot of what SourceTree shows: You can see the commit is selected on the left but there's also a disc next to the commit's description

I never faced such a problem before.

Would you know of to fix that? I'll provide any information needed to solve this problem...

Upvotes: 0

Views: 63

Answers (2)

Sergey Belash
Sergey Belash

Reputation: 1471

You are not "on two branches at once". The following just means that your branch master is in the same state as remote origin/master branch. You should not "fix" that at all. Keep calm and carry on ;)

Also, you may commit something and you will see that your branch is ahead of 'origin/master' by 1 commit. Then you may reset it back.

Upvotes: 3

Tim Biegeleisen
Tim Biegeleisen

Reputation: 521028

I don't think that you are on two branches at once, nor does Git allow this as far as I know. I believe that your master (local) branch and your remote tracking branch origin/master are up to date with each other. SourceTree is simply telling you this by showing both branches adjacent to each other. I am assuming that you are actually on the master branch.

You can confirm this by typing git status from the Bash.

Upvotes: 2

Related Questions