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
Answer accepted
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
Published an hour ago in Opsgenie

Getting the Most out of Atlassian and Opsgenie Together

We’re excited to invite you to this action-packed webinar where we will demonstrate how to integrate Opsgenie’s powerful alerting and on-call management tools with your entire Atlassian stack. Mar...

8 views 0 0
Read article

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