本地已存在项目,须要先获取远端更新并与本地合并,再git push 具体操做以下:git
git remote add origin https://github.com/username/Hello-World.git $git fetch origin //获取远程更新 $git merge origin/master //把更新的内容合并到本地分支
参考:Github学习github