Changes between Version 50 and Version 51 of WorkingWithGit


Ignore:
Timestamp:
Aug 26, 2016, 7:06:03 PM (8 years ago)
Author:
neverpanic (Clemens Lang)
Comment:

Document PRs and updating your fork.

Legend:

Unmodified
Added
Removed
Modified
  • WorkingWithGit

    v50 v51  
    186186
    187187
     188=== Submitting a pull request === #pr
     189If you are working on a fork of the ports repository, you can submit a pull request to have your changes considered for inclusion in the official repository. Follow the section on [#commit committing and pushing changes] to push your changes back to your fork (if you `git clone`d your fork, `git push origin` will push your changes back to your fork on GitHub). Then, go to your repository on GitHub and click the "New Pull Request" button. You will see a preview of the changes and a button to create a pull request. Modify the message for the pull request as you see fit and confirm the creation of the pull request.
     190
     191'''Note:''' This process is new to MacPorts developers. Please bear with us while we find the approach to pull requests that works best for us.
     192
     193
     194=== Updating your fork === #upstream-fetch
     195When submitting pull requests, we may ask you to rebase your changes on top of our current master branch. The easiest way to do this is adding the official repository as a second remote to your working copy and pulling from it. First, use `git remote` to add a reference to the upstream ports tree. Note that the name "upstream" can be chosen at random.
     196{{{
     197git remote add upstream git@github.com:macports/ports.git # or
     198git remote add upstream https://github.com/macports/ports.git # if SSH does not work on your network
     199}}}
     200
     201Then, fetch the contents of the upstream repository:
     202{{{
     203git fetch upstream
     204}}}
     205
     206Finally, follow the section on [#updating fetching the latest changes] but replace "origin" with "upstream". Eventually, you will end up running the equivalent of
     207{{{
     208git rebase upstream/master
     209}}}
     210which will put your local changes on top of ours. Pushing to your fork will update the pull request.
     211
     212
    188213
    189214