原文在此, 建議閱讀, 我把關鍵步驟抽出來了, 方便概覽git
(也就是add remote upstream, fetch upstream, rebase, 再push)github
Step 1: Forking a repofetch
git clone https://github.com/nitin-test/blog-example-fork.git git remote add upstream https://github.com/nitstorm/blog-example.git git remote git remote show origin git remote show upstream
Step 2: Making changes and submitting Pull Requestscode
git checkout -b word-addition git commit -am "Adds the word memory" git push origin word-addition # 網頁端發起merge到master
Step 3: Keeping the forked repo synced with the main repoorm
# 確保你是在master分支 git checkout master git fetch upstream git rebase upstream/master git push origin master