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:

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 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 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 and still having this issue.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Mar 14, 2019 in Bitbucket Pipelines

Building a Bitbucket Pipe as a casual coder :  #!/bin/bash source "$(dirname "$0")/" enable_debug extra_args="" if [[ "${DEBUG}" == "true" ]]; then extra_args="--verbose" fi # mandatory variables R...

283 views 0 12
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