[MacPorts] WorkingWithGitPRDraft modified

MacPorts noreply at macports.org
Fri Nov 4 18:42:08 CET 2016


Page "WorkingWithGitPRDraft" was changed by mojca
Diff URL: <https://trac.macports.org/wiki/WorkingWithGitPRDraft?action=diff&version=2>
Revision 2
Comment: preliminary notes about pull requests
Changes:
-------8<------8<------8<------8<------8<------8<------8<------8<--------
Index: WorkingWithGitPRDraft
=========================================================================
--- WorkingWithGitPRDraft (version: 1)
+++ WorkingWithGitPRDraft (version: 2)
@@ -168,7 +168,82 @@
 
 
 
-
+== Pull requests for ports ==
+
+=== Non-committers: How to submit a pull request? ===
+
+'''Note:'''
+  * There is no need to submit a pull request to GitHub if you are more comfortable uploading patches to the existing bug tracker on Trac.
+  * There is no need to submit pull requests for existing Trac tickets to GitHub. If you feel someone should do something about your tickets, please send a reminder to the developer mailing list.
+
+'''Important:''' Please make sure to [https://help.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/ Allow edits from maintainers] when you create the pull request.
+{{{
+#!div style="font-size: 80%"
+''The committer will usually have to rebase your changes on top of master to keep the history linear. Unless those changes are pushed to the branch with your pull request first, your request will appear to be rejected rather than merged on the GitHub user interface.''
+}}}
+
+==== 1. Fork the repository ====
+
+If you want to submit a patch, you will have to fork the repository first.
+
+Go to https://github.com/macports/macports-ports/ and click the fork button at the top right.
+
+Clone the repository with:
+{{{
+git clone git at github.com:<your-username>/macports-ports.git # or
+git clone https://github.com/<your-username>/macports-ports.git # if SSH does not work on your network
+}}}
+navigate to it (`cd macports-ports`) and add a link to upstream:
+{{{
+git remote add upstream git at github.com:macports/macports-ports.git # use https as above if needed
+}}}
+The name `upstream` is a name you can pick arbitrary. You can check which "remote" repositories you have with
+{{{
+> git remote -v
+origin    https://github.com/<your-username>/macports-www.git (fetch)
+origin    https://github.com/<your-username>/macports-www.git (push)
+upstream  https://github.com/macports/macports-www.git (fetch)
+upstream  https://github.com/macports/macports-www.git (push)
+}}}
+
+TODO: link to some short git docs about working with remotes
+
+==== 1. Make changes ====
+
+
+See the [#commit section on committing changes] to find out how to get your changes into the repository.
+
+=== Committers: How to merge a pull request? ===
+
+==== TODO ====
+
+{{{
+USER=some-username
+REMOTEBR=remote-branch-name
+LOCALBR=local-branch-name
+}}}
+
+{{{
+git fetch https://github.com/$USER/macports-ports.git $REMOTEBR
+git checkout -b $LOCALBR FETCH_HEAD
+git rebase master
+}}}
+
+`FETCH_HEAD` is the head of the last branch you fetched (and won't change until you run another `fetch`).
+One may create local branches from it.
+It can also be very useful when fetching directly from URL without having to create temporary remotes.
+
+
+==== Modifying pull requests ====
+
+If the user allowed modifying the branch of PR, you can use the following command to force push the changes to PR before accepting them:
+{{{
+git push -f https://github.com/$USER/macports-ports.git $REMOTEBR
+}}}
+
+==== Committing or accepting changes ====
+
+TODO
 
 == Common `git` tasks while working with ports ==
 
-------8<------8<------8<------8<------8<------8<------8<------8<--------

--
Page URL: <https://trac.macports.org/wiki/WorkingWithGitPRDraft>
MacPorts <https://www.macports.org/>
Ports system for macOS

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


More information about the macports-changes mailing list