Remote prune of branches not working on Windows SourceTree client

When doing a Fetch and selecting the Prune option as mentioned here and here doesn't seem to be working on the Windows SourceTree client. Using v1.3.1

When i go to bitbucket -> branches I see three branches (master, develop and a feature branch)

In SourceTree for the remote i see four branches (master, develope, feature branch and release branch). No matter how many time i click Fetch with Prune option the release branch is never removed.

Process i followed in SourceTree was (both local and remote up to date with same four brances mentioned above):

  1. Using git-flow finished the release
  2. Pushed modified branches to bitbucket (remote origin)
  3. Did a Fetch with prune option, remote still shows four branches
  4. Checked bitbucket and branch not appearing in Branches section
  5. Scratched head, searched google, remained bafled

8 answers

When I do a prune with git on the command line, it properly deletes the branches that were deleted on the repository, while this is not the case when I use Sourcetree. So it looks strongly like a bug to me.

Having the same issue with 1.6.11. The repository is a private git on bitbucket.

I'm also seeing this in 1.6.11. This used to work somewhere between 1.3.1 reported by Sam and 1.6.11 but it's regressed.

Upon further investigation, I don't think this is broken and instead a misunderstanding on my part. The GIT prune function only removes remote tracking branches. A remote branch is one that was CREATED on the remote. If you created the branch locally and subsequently pushed it, it's not a remote branch, it's local and will need to be deleted manually. This is the GIT behavior which Sourcetree is using. Learn more here: http://stackoverflow.com/a/21319735

Raffi,  I stand corrected then, it does sound like a bug in Sourcetree. I saw the same behavior when I tried using the command line, and found the article I mentioned.

Same here (Windows, ST 1.6.14.0). Has this never made it into any bugfix? We have a big number of feature branches which are often closed fast, and I really would appreciate it to not having to dedicate half an hour a day to look trough the remote and my local branches and delete the ones no longer existing.

Have this same issue currently on Version 2.0.5.2 for Mac connected to GitHub repo.

Using system git 2.3.6 running Mac OS 10.11  OR using embedded git 2.2.1 in sourcetree

 

Using version 2.6.9.0 and still having this issue.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 06, 2018 in Bitbucket

Upgrade Best Practices

Hello! My name is Mark Askew and I am a Premier Support Engineer for products Bitbucket Server/Data Center, Fisheye & Crucible. Today, I want to bring the discussion that Jennifer, Matt, and ...

428 views 6 9
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