Ms. Manners' Guide to Excruciatingly Correct Github Pull Requests
File this one with stuff I will need to know in the future but will probably have forgotten again.
Pony and Rust (and probably every other project that I haven't interacted with) using Github and pull requests want those pull requests to consist of a single commit. From Steve Klabnik, here's a short post on How to squash commits in a GitHub pull request, how to convert the messy stream-of-consciousness style of normal development into a neat and tidy package. It may even sort of work for most people.
For me, however, I ended up with a bunch of "merge from upstream/master" commits where I'd pulled in current updates. To create a decent pull request, I
- creating a new branch off of upstream/master,
- on the original working branch, ran git diff upstream/master > /tmp/patch to get the changes I wanted, editing it to clear out anything I didn't want, like that extra newline in packages/builtin/primitive.pony,
- on the new branch, applied the patch and committed it with a simple, yet beautiful, message, and
- pushed it to Github and created the pull request.
You know what they say, if all you have is a hammer, everything else is a usable nail.
And in other news, here is How to Write a Git Commit Message.