How do I remove deleted Git branches from Visual Studio 2015

前端 未结 3 2086
面向向阳花
面向向阳花 2021-02-18 17:27

Visual Studio continues to show any branch I\'ve pulled, even after that branch has been deleted (and I do not have it as the selected branch).

  • \"git fetch -
3条回答
  •  旧时难觅i
    2021-02-18 18:26

    prune is about removing any remote-tracking references that no longer exist on the remote.

    So if the branch still exists on the remote side, it won't be deleted locally.

    If the branch is deleted locally (with Visual Studio), its remote tracking instance will still be re-created at the next push.

    You need to make sure the branch is also deleted on the remote side:

    git push origin --delete abranch
    

提交回复
热议问题