VS Code 是我所有项目的实际 IDE 和 git 客户端。 我想更改实际存储库的源远程。
我该怎么做?
最佳答案
它可以通过终端完成。 (VS code有终端)
转到目录的根目录。
列出您现有的 Remote 以获得您想要更改的 Remote 的名称。
$ git remote -v origin git@github.com:USERNAME/REPOSITORY.git (fetch) origin git@github.com:USERNAME/REPOSITORY.git (push)
使用 git remote set-url 命令将远程的 URL 从 SSH 更改为 HTTPS。
$ git remote set-url origin https://github.com/USERNAME/REPOSITORY.git
验证远程 URL 是否已更改。
$ git remote -v origin https://github.com/USERNAME/REPOSITORY.git (fetch) origin https://github.com/USERNAME/REPOSITORY.git (push)
关于git - 如何更改 VSCode 中的远程源?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51979534/