vscode 集成 git 无需安装 扩展插件;
有修改的代码会在SourceControl内显示:

在文件上 右键 暂存更改 或 更改 右键 暂存所有更改:


Message栏内 输入 提交信息 按Ctrl + Enter 键 提交;

push 代码 到 git:

遇到的问题(前提 通过其他IDE(idea) push pull 代码 没有问题,只是VsCode 提示异常):
Host key verification failed.
fatal: Could not read from remote repository.
处理:
在项目工程路径下 右键 Git Bash Here
$ git pull
提示 是否用当前的 sshkey ....
输入 yes
然后开始正常 pull 代码;
再回到VsCode内 pull ,push 代码 ,发现正常了...
网友评论