git
GitHub
本地项目已经写好了,但是想推到 github 上,肿么办
1. 在 GitHub 上新建一个仓库
![](https://img.haomeiwen.com/i11247007/1644e36c817a9ce1.png)
2. 本地项目推倒远程仓库
在终端上进入本地仓库
![](https://img.haomeiwen.com/i11247007/d0fac5b6eb495e0e.png)
为本地项目创建 git
![](https://img.haomeiwen.com/i11247007/d64e88e403388b01.png)
git init
git remote add origin https://github.com/远程仓库地址
git push -u origin master
发现失败了,因为还没有将本地仓库的东西先 add,add 之后应当提交 commit
![](https://img.haomeiwen.com/i11247007/0318a974b8dae4d7.png)
![](https://img.haomeiwen.com/i11247007/e264ba28f31f159e.png)
git add *
git commit -m ""
这个时候再 push,push 成功,远程仓库也更新了
![](https://img.haomeiwen.com/i11247007/117d425061c5d52b.png)
![](https://img.haomeiwen.com/i11247007/fc9f5b6c54191804.png)
网友评论