vs code 关联gitee码云或github以及GIT 常用命令

一、要求
1、本地安装vs code 和GIT源代码管理工具
2、配置vscode git全局变量
1)、配置方法
打开左下角设置-->点击用户-->搜索git.path-->settings.json中编辑-->git.path值改为git.exe的安装路径 eg:D:Program FilesGitingit.exe
3、在项目文件路径下 GIT Bash 执行 以下命令
git init
git clone https://www.yourgiturlxxxx.git(克隆存储库)
git commit -m "init" //提交文件到本地仓库
git push -u origin master //提交代码到远程仓库,需要有README.md文件
4、vscode 打开项目工作区操作即可
1)、【源代码管理】中提交只是本地提交,提交至远程存储库需要在【源代码管理仓库】中推送

二、GET 常用命令
1、初始化仓库
git init
2、拉取仓储库内容
git pull --rebase origin master)
3、提交内容
git commit -m "init" //提交文件到本地仓库
4、关联仓库地址
git remote add origin https://www.yourgiturlxxxx.git //绑定远程仓库(你自己的仓库http地址)
5、推送至远程仓库(需要有README.md文件,不然提示failed to push some refs to ...)
git push -u origin master //提交代码到远程仓库
6、查看当前远程地址
git remote -v
7、修改远程仓库地址
git remote set-url origin <new url>
8、删除关联地址
git remote remove <url>

原文地址:https://www.cnblogs.com/dennisdong/p/14473340.html