本地已存在項目,須要先獲取遠端更新並與本地合併,再git push 具體操做以下:git
git remote add origin https://github.com/username/Hello-World.git $git fetch origin //獲取遠程更新 $git merge origin/master //把更新的內容合併到本地分支
參考:Github學習github