将 git 与 VS Code 连接

fxv*_*lad 4 git github visual-studio-code

如何配置 VS Code 以使用 git?我在 VS Code 中使用标准的 scm 提供程序。我在我的电脑上安装了 git,在一个文件夹中初始化了存储库,做了一些更改,VS 显示它已提交,但我在 github 上没有看到,当我想从 git 中提取时,VS 显示“你的存储库有没有配置可以拉出的遥控器。”

dst*_*nts 6

您首先需要将您的 GitHub 存储库添加为远程!为此,您可以遵循官方指南

git remote add origin https://github.com/user/repo.git
#optionals below just to verify
git remote -v
origin  https://github.com/user/repo.git (fetch)
origin  https://github.com/user/repo.git (push)
Run Code Online (Sandbox Code Playgroud)

然后您可以使用官方指南推送您的本地提交

git push -u origin master
Run Code Online (Sandbox Code Playgroud)

您可以从远程直接添加VS代码为引入这里