git
GitHub
本地项目已经写好了,但是想推到 github 上,肿么办
1. 在 GitHub 上新建一个仓库

2. 本地项目推倒远程仓库
在终端上进入本地仓库

为本地项目创建 git

git init
git remote add origin https://github.com/远程仓库地址
git push -u origin master
发现失败了,因为还没有将本地仓库的东西先 add,add 之后应当提交 commit


git add *
git commit -m ""
这个时候再 push,push 成功,远程仓库也更新了


网友评论