How do I prune tags?

The Graph in the Historical view can become quite confusing when there are many branches. I have been able to simplify it for myself by removing remote branches that I have no interest in:

git config remote.origin.fetch +refs/heads/master:refs/remotes/origin/master

git config --add remote.origin.fetch +refs/heads/mybranch:refs/remotes/origin/mybranch

git branch -r -d origin/yourbranch

I also remove any tags associated with yourbranch:

git tag -d yourbranch_tag1

But, on a subsequent fetch, even though yourbranch is not retreived, tags on yourbranch are retrieved, which causes the branch to shown again in the Historical view.

Can I configure SourceTree to fetch without getting tags like:

git fetch -n

Or not fetch at all so I can do it manually with the above command?

1 answer

1 accepted

1 vote
Accepted answer

There is no option to use 'git fetch -n' in SourceTree, but you can configure this in the config file for this repo:

git config --add remote.origin.tagopt --no-tags

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted 8 hours ago in Featured Groups

Are you managing your users efficiently?

Hi everyone, I am Marek, a Senior Product Manager for Crowd   Server and Data Center   here at Atlassian. I would like to spark a discussion about challenges you have with managing use...

72 views 1 2
View post

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