Working with Git

Clemens Lang cal at
Thu Oct 6 01:11:25 PDT 2016

Hi Ryan,

----- On 6 Oct, 2016, at 04:53, Ryan Schmidt ryandesign at wrote:

> With Subversion, the user would submit a patch in a Trac ticket. To test it, I
> would download the patch and apply it to my local Subversion working copy. If I
> like it, I commit it. If I don't like it, I give feedback to the user in the
> ticket, or I edit the Portfile further and commit it, then tell the user in the
> ticket what changes I made.
> How will this work on GitHub?

You add the pull request as a remote, fetch the changes, check them out in a
branch and test locally. If you like them, merge/cherry-pick/rebase them into the
master and push. This automatically closes the pull request.

Alternatively, you can start amending the changes locally by adding new commits on
top, or editing existing commits. If you like, you can push those back to the pull
request and submit them using GitHub's interface, but there's really not that much
difference between committing them directly and clicking the merge submit in the
pull request UI.

If a user updates his pull request that works the same way as a normal update from
git would: You fetch the changes and update your local copy; see our existing docs
on working with git.

> Clemens, in your repository here, you committed something I had previously
> committed in a fork, but had not submitted a pull request for:
> The GitHub interface says "ryandesign committed with neverpanic". How did you
> cause that notation to appear, and is that something we should be using in our
> MacPorts git workflow?

I added your repository as remote and used git cherry-pick $your_commit_id. I then
edited your change using git commit --amend and git rebase --interactive and
pushed. The Author field of the commit was not modified, but the Committer field
was changed to me, which is why you see "ryandesign committed with neverpanic".

Clemens Lang

More information about the macports-dev mailing list