Hemang Joshi@SOLO MINGW64 ~ (add-hemang-joshi)
Hii, I am new to GitHub and I want to know that what is this, and why it is showing every time and how can I remove it? (add-hemang-joshi) is in green colour in GitBash. See the image as well.
I tried using:
git branch -D add-hemang-joshi
but didn't work and showed an error viz.
error: Cannot delete branch 'add-hemang-joshi' checked out at 'C:/Users/7386-856
15SG 2913642'

You couldn't delete the branch you are on currently. So checkout to the other branch and then delete the required branch.
git checkout master
The above command switches to the master branch.
git branch -d add-hemang-joshi
The above command would delete the add-hemang-joshi branch.
Adding to the above
The -d option will delete the branch only if it has already been pushed and merged with the remote branch.
The -D is to force delete a branch even if it hasn't been pushed or merged yet.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With