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
Answer 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 Sign up to answer
Community showcase
Posted yesterday in United States

Confluence Security Advisory

Good morning Members, Not sure if you are aware. Please read the following: More details: https://co...

35 views 1 0
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