瀏覽代碼

Explained an alternative way to fetch a branch.

This avoids adding each contributor as a remote.

Thanks Fruneau for the report.
Aymeric Augustin 12 年之前
父節點
當前提交
1f203f84d0
共有 1 個文件被更改,包括 6 次插入0 次删除
  1. 6 0
      docs/internals/contributing/committing-code.txt

+ 6 - 0
docs/internals/contributing/committing-code.txt

@@ -76,6 +76,12 @@ checkout the branch and work from there::
     git remote add <contributor> https://github.com/<contributor>/django.git
     git checkout pull_xxxxx <contributor> <contributor's pull request branch>
 
+Yet another alternative is to fetch the branch without adding the
+contributor's repository as a remote::
+
+    git fetch https://github.com/<contributor>/django.git
+    git checkout -b pull_xxxxx FETCH_HEAD
+
 At this point, you can work on the code and continue as above.
 
 GitHub provides a one-click merge functionality for pull requests. This should