[MacPorts] WorkingWithGit modified

MacPorts noreply at macports.org
Fri Aug 26 12:06:05 PDT 2016


Page "WorkingWithGit" was changed by cal at macports.org
Diff URL: <https://trac.macports.org/wiki/WorkingWithGit?action=diff&version=51>
Revision 51
Comment: Document PRs and updating your fork.
Changes:
-------8<------8<------8<------8<------8<------8<------8<------8<--------
Index: WorkingWithGit
=========================================================================
--- WorkingWithGit (version: 50)
+++ WorkingWithGit (version: 51)
@@ -185,6 +185,31 @@
 See the [#commit section on committing changes] to find out how to get your changes into the repository.
 
 
+=== Submitting a pull request === #pr
+If 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.
+
+'''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.
+
+
+=== Updating your fork === #upstream-fetch
+When 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.
+{{{
+git remote add upstream git at github.com:macports/ports.git # or
+git remote add upstream https://github.com/macports/ports.git # if SSH does not work on your network
+}}}
+
+Then, fetch the contents of the upstream repository:
+{{{
+git fetch upstream
+}}}
+
+Finally, follow the section on [#updating fetching the latest changes] but replace "origin" with "upstream". Eventually, you will end up running the equivalent of
+{{{
+git rebase upstream/master
+}}}
+which will put your local changes on top of ours. Pushing to your fork will update the pull request.
+
+
 
 
 
-------8<------8<------8<------8<------8<------8<------8<------8<--------

--
Page URL: <https://trac.macports.org/wiki/WorkingWithGit>
MacPorts <https://www.macports.org/>
Ports system for OS X

This is an automated message. Someone added your email address to be
notified of changes on 'WorkingWithGit' page.
If it was not you, please report to .


More information about the macports-changes mailing list