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

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 Join to answer
Community showcase
Louis De Jaeger
Posted Thursday in Off-topic

Friday fun: your best joke

Hi all Lets make this Friday fun really fun and post one (or more) of your best jokes! The joke can be about an Atlassian product, or just a really fun joke you want to share! I’m not the best j...

178 views 12 3
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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot