Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How do I prune tags?

Ken Taylor December 28, 2012

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
stevestreeting
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 30, 2012

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
TAGS
AUG Leaders

Atlassian Community Events