問題發生原因
可能有其他人使用 branch 並 push 上去,master 版本比我的新,導致我 commit 後想要 push 時出錯
git push 時的錯誤

但想要 pull 時又發生另一個錯誤:Need to specify how to reconcile divergent branches.
git pull 時的錯誤

查看 git status
會發現 git 說我的 master 有分歧的狀況

解決方法 Solution
執行 git config pull.rebase false
並再次 git pull
由於這會產生多一個 merge 的 commit
所以中間會被詢問 commit message 請記得輸入
$ git config pull.rebase false
$ git pull origin master

—
再次查看 git status
會發現已經沒有分歧問題,並且增加了一個 commit

—
最後再執行一次 git push
即可成功
$ git push origin master