It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Refresh local branches (automatically remove local branches that were deleted on remote)

Hi!

I've deleted a branch in my remote repository, but sourcetree keeps showing it in the list of local branches. Is there any way Sourcetree automatically remove the local branch if it was already deleted in the remote repository?

Thanks

1 answer

1 accepted

2 votes
Answer accepted
Mikael Sandberg Community Leader Jan 15, 2018

You need to do a Fetch and check the box to prune tracking branches, that will remove branches that you have removed on the remote.

This will only remove Branches under "Remote" and not my "Local" Checked out (now remotely deleted) Branches, yes?

If so: How I can "Prune" my Local branches?

Like burak_uyar likes this
Mikael Sandberg Community Leader Sep 18, 2018

@Johannes Sebastian Correct, the fetch will only affect remote branches. To delete local branches you have to right-click on it and select Delete... Note that you can only delete branches that are not checked out.

Like Alexis Toby likes this

Thank you for a quick response.

That is the answer I was expecting. Remote actions will not affect my local branches.

I am sure there is are good arguments for this....

However, that is what I need.

It is a small feature and I hope SourceTree will offer it in the future :)

Like # people like this

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Sourcetree

Sourcetree for Windows - CVE-2019-11582 - Remote Code Execution vulnerability

A vulnerability has been published today in regards to Sourcetree for Windows.  The goal of this article is to give you a summary of information we have gathered from Atlassian Community as a st...

4,927 views 0 12
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you