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

后端 未结 10 1499
無奈伤痛
無奈伤痛 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:05

    You don't have to git fetch --prune and restart VSCode anymore.
    With VSCode 1.52 (Nov. 2020), you now have:

    Git: Prune on fetch

    Enabling the git.pruneOnFetch setting will make VS Code run git fetch --prune when fetching remote refs.

    No more extra branch locally once they have been deleted from GitHub.

    See PR 89249, fixing issue 86813:

    Usage:

    {
       "git.pruneOnFetch": true
    }
    

    Setting is false by default.

    This would add the --prune flag to all git fetches.

提交回复
热议问题