使用Visual Studio Code进行Nodejs开发充满了便利,为了更好的进行开发工作,有必要使用Github进行代码管理。
Visual Studio Code已经集成了GIT组件:
https://github.com/git-for-windows/git/releases/download/v2.8.1.windows.1/Git-2.8.1-64-bit.exe
下载并安装好,后开始配置GITHUB
1.设置全局Git用户名
$ git config --global user.name mengkzhaoyun $ git config --global user.email [email protected]
2.映射到本地目录
$ cd D:\Libraries\Documents\Visual Studio Code $ git clone https://github.com/Mengkzhaoyun/HZW.git Cloning into ‘HZW‘... remote: Counting objects: 1690, done. remote: Compressing objects: 100% (1441/1441), done. remote: Total 1690 (delta 212), reused 1675 (delta 200), pack-reused 0 Receiving objects: 100% (1690/1690), 6.74 MiB | 58.00 KiB/s, done. Resolving deltas: 100% (212/212), done. Checking connectivity... done. Checking out files: 100% (1643/1643), done.
3.检查是否设置好了
$ git remote -v origin https://github.com/Mengkzhaoyun/HZW.git (fetch) origin https://github.com/Mengkzhaoyun/HZW.git (push)
如果不存在以上信息可以打开项目目录重新映射
$ cd D:\Libraries\Documents\Visual Studio Code\HZW $ git init $ git remote add origin https://github.com/Mengkzhaoyun/HZW.git
4.修改代码,Commit , Push
Commit提交变更到本地,
Push才是提交更新至github服务器
时间: 2024-11-01 01:04:59