'Get VS Code to recreate remote branch if it's missing

If I create pull request from a remote branch and that branch get deleted when the PR is merged, occasionally I'd like to create another pull request from that branch - which I still have locally. When I click sync in Visual Studio, it's smart enough to just recreate the branch if it was deleted, but VS Code throws the error

Git: fatal: couldn't find remote ref feature/somebranch

Is there a way to get VS Code to recreate the missing branch like Visual Studio does?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source