Can't delete branch SourceTree

I am using Github and also SourceTree. I have made a git clone of my project.

Now when I try to delete a branch I made local, I face the following error:

git -c diff.mnemonicprefix=false -c core.quotepath=false branch -D develop
error: Cannot delete branch 'develop' checked out at 'C:/Users/näZAN/Documents/Protractor'
Completed with errors, see above.

Screenshot:

I am pretty new to working with branches, etc.

1 Answer

You cannot delete a branch that you are currently on.

If you want to delete the develop branch, you'll first need to create and switch to another one.

Note: This isn't specific to Sourcetree; this is how git works.

0

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like