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

1 vote
Accepted answer
Mikael Sandberg Community Champion 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?

Mikael Sandberg Community Champion 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.

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 :)

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Friday in Jira Service Desk

Looking for anyone who has switched from Zendesk to Jira Service Desk

Hi Community! The Jira Service Desk marketing team is looking for customers who have successfully switched from Zendesk to Jira Service Desk!   We’d love to hear your thoughts on the pros and ...

44 views 2 2
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