Using Git in VS Code

本文介绍了如何在 Visual Studio Code (VS Code) 中使用 Git。首先,需要安装 VS Code 和 Git,然后通过快捷键 Ctrl+Shift+G 打开源代码控制。遇到问题时,如遇到需要设置 'user.name' 和 'user.email' 的错误,可以通过运行特定命令来配置。对于不断出现的 Git 认证对话框,可以使用 Git 的凭证助手来缓存 GitHub 密码。

Using Git in VS Code

Reference from VS Code official docs Using Version Control in VS Code.

  1. Install VS Code.
  2. Install Git.
  3. Open “Source Control”(Ctrl+Shift+G). Now you can use Git in VS Code.

Common Questions

Error dialog: Make sure you configure your “user.name” and “user.email” in git."

You can run below command to configure it.

$ git config --global user.email "you@example.com"
$ git config --global user.name "Your Name"
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值