Visual Studio Code - remove branches deleted on GitHub that still show in VS Code?

后端 未结 10 1559
無奈伤痛
無奈伤痛 2021-01-29 20:50

In VSCode, after I do a pull request and delete the branch on GitHub, that branch still shows up in Visual Studio Code. If I select the branch, it gives an Error, as expected. <

10条回答
  •  广开言路
    2021-01-29 21:16

    I found a way to fix this. So you need to remove the remote that links to the Github repo, then add the remote again.

    All the branches that are deleted from Github will no longer show up in vscode. Assuming that origin is the name for the remote repo.

    git remote remove origin
    

    Then

    git remote add origin git@github.com:your-username/repo-name.git
    

提交回复
热议问题