向原本的 Patchwork repository 發送 Pull Request

Pull Requests

當你修改或改善 forked 專案時,通常會想把這些修改發給原本的維護者,希望原作者 pull 你的 request,讓大家都可以從更新中受益————這就是 Pull Request

到原本的“專案”(github.com/jlord/patchwork)發送一個 pull request 吧,這樣我們才可以把你加到工作坊的挑戰成功者清單裡哦。

An illustration showing two options. The latter option contains more of the alphabet than the first and is asking the first to accept its work so that the alapabet is complete.

建立 Pull Requests

原本的專案頁面(http://github.com/jlord/patchwork)。

通常 GitHub 會偵測你有 push 了新 branch 到 fork,然後在原專案的上方放上特別的提示。如果有看到提示的話,提示內容應該是以你名字 'add-username' 的 branch。這樣的話就可以直接按 'Compare & pull request' 來建立 Pull Request 哦。如果沒有看到訊息也沒關係:

  • 在右邊的側欄按 'Pull request',接著按 'New pull request'。
  • 選擇你修改過的那個 branch。名字應該是 'add-username' 的那一個哦

接著你會看到一頁有著 pull request 資訊的頁面,這就對了,你正在發送 pull request 的過程。這一頁會顯示你的 pull request 和原本 'gh-pages' branch 相比的 commits 和變動。

若原本的 repository 有一份 contributing 說明 的話,GitHub 會顯示這個文件的連結。這份文件是 repository 原作者所撰寫,說明這個專案最佳的貢獻方式。

若是全部和你預期的一樣,沒有任何問題的話:

  • 按 'Create pull request'
  • 針對修改的內容,輸入標題與描述,用來建議原作者為什麼要收取這個 pull request。
  • 按 'Send pull request'!

賓果!Pull Request 成功送出,閉上眼睛,花幾秒感受這一刻。

如果 Pull Request 沒有問題的話,很快就會被自動 merged 了哦。若沒有很快的被自動 merged 的話,Reporobot 會留言告訴你,為什麼不能 merge。如果是這樣子呢,先 close GitHub 上面的 Pull Request,在你的 branch 做適當的修改,再次 push 這些修改並重新發送 Pull Request 哦。