diff options
author | Richard Schneeman <richard.schneeman@gmail.com> | 2014-09-23 19:37:39 +0900 |
---|---|---|
committer | Richard Schneeman <richard.schneeman@gmail.com> | 2014-09-23 19:37:39 +0900 |
commit | 13e1348cbad06c8dd20f03dc0cba334e591e5851 (patch) | |
tree | e49785911e1dce1221c63638950591064ac32803 /guides | |
parent | 017294066fd7f54401d13db116f59655553e6b8c (diff) | |
parent | 6aa11fbb1a270f2cc8f7a333f87cc6a5afc4fad6 (diff) | |
download | rails-13e1348cbad06c8dd20f03dc0cba334e591e5851.tar.gz rails-13e1348cbad06c8dd20f03dc0cba334e591e5851.tar.bz2 rails-13e1348cbad06c8dd20f03dc0cba334e591e5851.zip |
Merge pull request #17026 from prathamesh-sonpatki/mention-updating-pull-requests
Added note about updating pull requests by force push
Diffstat (limited to 'guides')
-rw-r--r-- | guides/source/contributing_to_ruby_on_rails.md | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/guides/source/contributing_to_ruby_on_rails.md b/guides/source/contributing_to_ruby_on_rails.md index 8bc4b10591..0266a92d07 100644 --- a/guides/source/contributing_to_ruby_on_rails.md +++ b/guides/source/contributing_to_ruby_on_rails.md @@ -559,6 +559,23 @@ $ git push origin my_pull_request -f You should be able to refresh the pull request on GitHub and see that it has been updated. +#### Updating pull request + +Sometimes you will be asked to make some changes to the code you have +already committed. This can include amending existing commits. In this +case git will not allow you to push the changes as the pushed version +and local version does not match. Instead of opening new pull request, +you can force push to your branch on Github like described earlier in +squashing commits section: + +```bash +$ git push origin my_pull_request -f +``` + +This will update the branch on Github with your new code and +Github will take care of updating the pull request with new code. + + ### Older Versions of Ruby on Rails If you want to add a fix to older versions of Ruby on Rails, you'll need to set up and switch to your own local tracking branch. Here is an example to switch to the 4-0-stable branch: |