When adding new Tag it “creates” a bew “branch”

I'm new using SourceTree (and git/version control in general), so I don't know if this is the expected behavior, but I don't think so.

I have a project with some commits. When I started adding tags to this project I noticed it started to create new "branchs" automatically in some tags. Not all of the tags does this, and it's also not an actual branch, but it displays some different colors, which is making me confused.

See these images below:

Before adding tag "0.3.0":

iEjZy

After adding tag "0.3.0":

njb7q

 

As you can see, it created a new color/line, kind of representanting a new branch in paralalell. I don't know what I may have done that caused this, but I'd like to be able to create new tags and keep only one branch.

Also, depending on the number of tags I add, it can have more lines/colors. At one time I had 6 different colors.

 

How can I solve this?

1 answer

0 vote
Mike Corsaro Atlassian Team May 25, 2017

Hello! It looks like those are actually 2 different branches (keep in mind that colors are not always the same for each branch). If you look at the commits in the first picture, you can see they're actually the same commits as the pinkish color line in the second picture. Here's a img with the blue line faded out, and the orginal line colored to be pink:

linez.png

Hopefully that clears it up.

But inside the "Branch" menu I onlye have one, which is "Master". Also, I didn't created any other new brach, the only thing I did was these steps:

Right click > Tag... > Add tag

After confirm to add a new tag, that thing happened, and I don't know why.

Mike Corsaro Atlassian Team May 25, 2017

I assume there's someone else who works on this project? After adding a tag SourceTree will typically perform a fetch, which will update the Log with other branches other people may have created.

No, I'm the only person using this. The only thing different from commiting I did was to return to a previous commit to undo some changes (Reset current branch to this commit), and then continued using it normally.

 

This is why I think this is weid.

Mike Corsaro Atlassian Team May 25, 2017

If you follow the blue branch, what's the newest dot? I suspect you may have created a detached head by returning to a previous commit.

Actually I removed all the tags because it was a really big mess! I had over 6 different colors/lines, it was impossible to follow along with that.

To add on this comment, when I remove all the tags, it stays like the first image, just one "branch"/color and everything in order. Just like it was supposed to be.

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Published Jan 23, 2018 in Sourcetree

Tip from the team: workflow and keyboard shortcuts

Supported Platforms macOS Sourcetree has a lot to offer and, like many developer tools, finding and using it all can be a challenge, especially for a new user. Everyone might not love ...

800 views 0 4
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