Remote prune of branches not working on Windows SourceTree client

Sam Craig November 11, 2013

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

1 vote
Raffi Enficiaud November 24, 2014

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.

0 votes
Edy B June 27, 2018

Using version 2.6.9.0 and still having this issue.

0 votes
Scott Dunkle September 15, 2015

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

 

0 votes
Noël Ströhmer July 15, 2015

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.

0 votes
Paul Tiemann November 24, 2014

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.

0 votes
Paul Tiemann November 24, 2014

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

0 votes
Paul Tiemann November 20, 2014

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.

0 votes
Raffi Enficiaud November 17, 2014

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

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events