github 导入本地项目

1 . 在本地项目根目录初始化

git init

2 . 提交所有代码到暂存区

git add .

3 . 提交

git commit -m"description"

4 . 关联远程仓库

git remote add origin +地址

5 . 远程仓库同步

git pull --rebase origin master

6 . 推送到github (前提是远程仓库有同名的项目)

git push -u origin master

猜你喜欢

转载自blog.csdn.net/hanzhenbushihu/article/details/81356674