Git上传项目到远程仓库

2019-02-20  本文已影响0人  wangfanghua

Git如何推送项目到Github展示

github是全球非常火热的开源社区,全世界非常多的开发者都乐意将自己优质的开源项目以及优质设计放在上面供人展示,在Github上你的项目Star越多那么从侧面上讲也相对认可你的技术,刚开始学习的开发者也可以将自己的学习笔记放在上面。

1.安装git软件: 这个www.baidu.com
2.建立Git与Github的远程联系(PY一下)
3.初始化本地仓库
git init
git add .
git commit -m
git remote origin 你的github仓库连接
git push -u origin master
如果提示这种错误:
 ! [rejected]        master -> master (fetch first)
error: failed to push some refs to 'https://github.com/wangly19/Student.git'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

git pull --rebase origin master
上一篇下一篇

猜你喜欢

热点阅读