diff options
Diffstat (limited to 'docs/internals/contributing/committing-code.txt')
| -rw-r--r-- | docs/internals/contributing/committing-code.txt | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/docs/internals/contributing/committing-code.txt b/docs/internals/contributing/committing-code.txt index 64e5dfebcd..13c139c5c5 100644 --- a/docs/internals/contributing/committing-code.txt +++ b/docs/internals/contributing/committing-code.txt @@ -11,8 +11,8 @@ contribute code to Django, look at :doc:`writing-code/working-with-git` instead. Handling pull requests ====================== -Since Django is now hosted at GitHub, most patches are provided in the form of -pull requests. +Since Django is hosted on GitHub, patches are provided in the form of pull +requests. When committing a pull request, make sure each individual commit matches the commit guidelines described below. Contributors are expected to provide the @@ -26,14 +26,14 @@ builders that doesn't run automatically, such as Oracle or Selenium. See the .. _Jenkins wiki page: https://code.djangoproject.com/wiki/Jenkins -An easy way to checkout a pull request locally is to add an alias to your -``~/.gitconfig`` (``upstream`` is assumed to be ``django/django``):: +If you find yourself checking out pull requests locally more often, this git +alias will be helpful:: [alias] pr = !sh -c \"git fetch upstream pull/${1}/head:pr/${1} && git checkout pr/${1}\" -Now you can simply run ``git pr ####`` to checkout the corresponding pull -request. +Add it to your ``~/.gitconfig``, and set ``upstream`` to be ``django/django``. +Then you can run ``git pr ####`` to checkout the corresponding pull request. At this point, you can work on the code. Use ``git rebase -i`` and ``git commit --amend`` to make sure the commits have the expected level of quality. @@ -243,8 +243,8 @@ When a mistaken commit is discovered, please follow these guidelines: * The release branch maintainer may back out commits to the release branch without permission if the commit breaks the release branch. -* If you mistakenly push a topic branch to ``django/django``, just delete it. +* If you mistakenly push a topic branch to ``django/django``, delete it. For instance, if you did: ``git push upstream feature_antigravity``, - just do a reverse push: ``git push upstream :feature_antigravity``. + do a reverse push: ``git push upstream :feature_antigravity``. .. _ticket tracker: https://code.djangoproject.com/ |
