1、安装git和vscode
2、配置git
git config --global user.name "xxx"
git config --global user.email "xxx@163.com"
3、vscode选择文件夹作为工作目录
4、vscode中进入命令面板搜索git,选择git初始化命令
5、在文件夹中选择git bash here
SSH模式
git remote add orgin git@github.com:xxx/aaa.git
HTTP模式
git remote add orgin https://github.com/xxx/xxx.git
xxx是你的github用户名, aaa.git 是你在github上的仓库名
ssh和http互换的时候
# 先看一下远端地址是否自己想要的
git remote -v
# 不是就移除
git remote remove origin
6、输入
git pull orgin master
将远程仓库拉到本地
1、个人在github上面创建了仓库,通过本地的git拉取远程仓库到本地报错信息如下:
http://www.mamicode.com/info-detail-2523100.html
git pull push出现There is no tracking information for the current branch错误
解决在通过git客户端 git pull的时候出现Threre is no tracking information for the current branch . Please specify which branch you want to merge with。
就是需要指定本地projet分支,跟远程仓库项目分支之间的关系,比如,我们需要本地master对应远程的master
git branch --set-upstream-to=origin/master master
git push --set-upstream orgin master