git连接不上远程仓库---visualstudio提交代码报错:no upstream configured for branch 'master'

1,新建文件夹,在文件下下鼠标右键git bush--->git init,初始化仓库;

2,设置gitthub仓库地址:git remote add origin https://github.com/z*****g/lm.git

3,git pull origin master

4,git push --set-upstream origin master,关联一个远程分支,并从这个分支上传下带代码

git branch查看分支

git add .

git commit -m "提交注释"

git checkout  master 切换到master分支

git pull 从远程仓库拉去最新代码,更新代码后,要看代码是否有冲突,解决冲突后,git merge

git push把代码提交到远程仓库,git merge

参考网址:

https://blog.csdn.net/benben_2015/article/details/78803753

https://www.cnblogs.com/xuanhun/p/6019038.html

猜你喜欢

转载自www.cnblogs.com/js0618/p/10126313.html