Fork me on github

如何从本地把项目上传到github

在本地项目所在目录按以下步骤操作

echo # test >> README.md
git init
git add README.md 

git add . 

git commit -m "first commit" 
git remote add origin https://github.com/qhorse/test.git 
git push -u origin master
$ git remote add origin https://github.com/qhorse/test.git

fatal: remote origin already exists.
解决办法如下:

1、先输入$ git remote rm origin

2、再输入$ git remote add origin https://github.com/qhorse/test.git

就不会报错了!

最后一步上传

 

posted @ 2015-08-04 10:51  Champion-水龙果  阅读(133)  评论(0编辑  收藏  举报
Champion-水龙果