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

7 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

 

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Piotr Plewa
Published Dec 27, 2017 in Bitbucket

Recipe: Deploying AWS Lambda functions with Bitbucket Pipelines

Bitbucket Pipelines helps me manage and automate a number of serverless deployments to AWS Lambda and this is how I do it. I'm building Node.js Lambda functions using node-lambda&nbsp...

2,034 views 1 5
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