Skip to content

Commit

Permalink
[contributing guide] add instructions to update fork [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
rafmagana committed May 29, 2012
1 parent cfe731c commit 2c4da97
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions guides/source/contributing_to_ruby_on_rails.textile
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,42 @@ Push to your remote:
$ git push mine my_new_branch
</shell>

You might have cloned your forked repository into your machine and might want to add the original Rails repository as a remote instead, if that's the case here's what you have to do.

In the directory you cloned your fork:

<shell>
$ git remote add rails git://github.com/rails/rails.git
</shell>

Download new commits and branches from the official repository:

<shell>
$ git fetch rails
</shell>

Merge the new content:

<shell>
$ git checkout master
$ git rebase rails/master
</shell>

Update your fork:

<shell>
$ git push origin master
</shell>

If you want to update another branches:

<shell>
$ git checkout branch_name
$ git rebase rails/branch_name
$ git push origin branch_name
</shell>


h4. Issue a Pull Request

Navigate to the Rails repository you just pushed to (e.g. https://github.com/your-user-name/rails) and press "Pull Request" in the upper right hand corner.
Expand Down

0 comments on commit 2c4da97

Please sign in to comment.