Luukv93
Luukv93

Reputation: 359

How to remove synced remote repository from vscode

I'm relatively new to Git and Vscode. For test purposes I created and synced a remote repository and afterwards I deleted the repository in GitHub. Now I want to sync the folder with a new repository but it does not let me. I get the following error: "Git: remote: Repository not found."

How do I delete the sync and local branches that are connecting to the deleted remote repository?

enter image description here

Upvotes: 2

Views: 20146

Answers (2)

VonC
VonC

Reputation: 1330092

Note that VSCode 1.58 (June 2021) enhances its Repositories VIew management and includes:

you can now remove a remote repository from the Remote Repositories view in the Remote Explorer.

So if you do not want to use Git command, you now can remove a remote repository entirely using VSCode GUI.

Upvotes: 1

fnet
fnet

Reputation: 338

Dry run

git remote prune origin --dry-run

will display all of the remotes currently assigned to the project.

Remove

git remote prune origin

If you're sure the origin is incorrect.

Upvotes: 3

Related Questions