Skip to content
Easyli edited this page Jan 16, 2017 · 2 revisions

GitHub新建本地项目(空项目,没有clone)

初始化,添加文件,提交,添加并推送到远端

echo "# test" >> README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin https://github.com/easyli/test.git
git push -u origin master

GitHub推送已经存在的项目(git clone下来的,并且已经有commit)

git remote add origin https://github.com/easyli/test.git
git push -u origin master

Clone this wiki locally