How do I delete all local branches in SourceTree

ryuuguu November 16, 2013

My local branches in SourceTree seem to be out of sync. When I check out a branch from the origin some files are missing. So I would like to delete all local branches so that sourctree(git) does not think there any local files and will copy all files from origin repository. I can not delete the local branch that is is active (option is greyed out). Is there any way to totally delete the local branches so I can start cleanly and get a full check out?

1 answer

1 accepted

2 votes
Answer accepted
Jeff Thomas
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 16, 2013

What about deleting the local repository and re-cloning it from the remote server? That would wipe out the local branches and let you have a clean copy of the repository. This would delete any local commits you've made that have not been pushed to the server.

If you remove the bookmark in SourceTree, you'll also being given the option to remove it from the disk, which will wipe it out.

ryuuguu November 17, 2013

That does it. I was hoping to just do some sort of forced resync but I can't find anything git like that.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events