Why can I still see git branch -a after git deletes the remote end?
ringa_lee
ringa_lee 2017-05-02 09:38:20
0
4
629

After I added a remote end using git remote add origin2 xxxxxxx, I pushed some branches to origin2, and then deleted origin2, but now when I run git branch -a, I still see a lot of origin2 branches; please ask How to delete all the deleted remote branches?

ringa_lee
ringa_lee

ringa_lee

reply all(4)
習慣沉默

Thank you everyone for your answers. I found the problem. The reason is because I deleted origin2 directly in the .git/config file. As a result, the branch of origin2 will still be listed when using git branch -a, and it cannot be deleted (git push origin2 :yourbranch will not work either)
The solution is :git remote add origin2 xxxxx

      git remote remove origin2这样正常删除一次,缓存的origin2的分支就都删掉了
PHPzhong

git push origin2 :yourbranch

阿神

git fetch -p

给我你的怀抱

Use command

git push origin2 -D branch_name

That’s it.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template