出现该错误原因是只操作了git add 没有接着操作 git commit。 执行git commit 后再执行git push就行。 https://segmentfault.com/q/1010000004615080