I'm trying to delete a branch on git both locally and remotely. And I think I've been successful. Thing is it still shows up remotely when I do a 'git branch -a'
I did this to delete it locally:
git branch -d branchToDelete
and this to delete it remotely:
git push origin --delete branchToDelete
I think I deleted it successfully on both ends.
If I do git pull branchToDelete
I get the following fatal: 'branchToDelete' does not appear to be a git repository fatal: Could not read from remote repository.
Which I thought means it no longer exists remotely?
But if I do
git branch -a
Then it still shows up in the list
remotes/origin/branchToDelete
So why does it keep showing up if it's deleted both locally and remotely?
And yes, the branch is/was named the same both locally and remotely.
Thanks much
您需要执行git fetch -p
来修剪(删除)已删除的远程分支的本地跟踪分支。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.