githubteacher / githubfordevelopers-april

GitHub for Developers Training
4 stars 11 forks source link

git pull --prune doesn't seem to remove the branch that has been removed #149

Closed kraghuram closed 7 years ago

kraghuram commented 7 years ago

when I run 'git branch --all' I still see the branch that has been removed with 'git branch -d '.

brianamarie commented 7 years ago

@kraghuram Hm. Let's see what branch you're on now: If you type git status what is the output? If you're on gh-pages, you might want to try deleting it again.

What might have happened is that you tried to delete the branch while you were still on it - in that case, it wouldn't let you delete it.

kraghuram commented 7 years ago

I believe I have deleted when I am on the master(gh-pages): The following is what I see now:

$ git branch --all

brianamarie commented 7 years ago

@kraghuram Ah, I see. You deleted the local working branch, but not the remote tracking branch. To do that, type git fetch --prune.

kraghuram commented 7 years ago

I believe I have done that already, but trying again:

$ git fetch --prune $ git branch --all

brianamarie commented 7 years ago

@kraghuram Did you delete the branch on the remote?

kraghuram commented 7 years ago

ah, I didn't do that. How do I do that?

brianamarie commented 7 years ago

@kraghuram You can delete it from the pull request, or from this page.

kraghuram commented 7 years ago

thx Brian.

brianamarie commented 7 years ago

👍