直接合併到主人

如果要進行要與 master 合併的更改,最好的方法是首先建立主題分支

git checkout -b foo

使用你的功能進行一次提交

git commit -m "Made the thing X finally work"

並推動該分支審查通過

git push origin foo:refs/for/master/foo

避免直接在 master 上工作,因為如果有人在你之前推進掌握,你就會遇到解決衝突的問題。如果你在單獨的分支上工作,那麼解決衝突就像這樣簡單

git checkout master
git pull origin master
git checkout foo
git rebase master
git push origin foo:refs/for/master/foo