> On 9 Nov 2016, at 12:51 pm, René J.V. Bertin <[email protected]> wrote: > > Hi, > > I've just managed (I think) to fork macports-ports via github.com, add it as > an additional remote to my working copy of the original, created a topic > branch in my fork and made a pull request from there. > > Questions raised during that process: > > 1- Initially I followed github's suggestions as usual and added a README.md > (in a first commit), thinking I'd be able to avoid that file easily enough. > Instead it appears that pull requests can not be made for a specific commit > or file/directory; README.md was an unintended part of my request. When I > removed the file the pull request showed the addition and removal and I'm > quite sure the same would have been true for a reverse commit. I managed to > back out and recreate the branch, but it's highly annoying you only find out > such things after doing a commit. > Is there a way around this, or are pull requests always a reflection of the > difference between the original master/head and the fork's head? IOW, is it > going to be necessary to use 1 branch per pull request? That'd make it very > impractical to use a single ports tree as both a local source for installed > ports and a source for pull requests …
In my view, no it is not practical. Pull requests are to pull one branch, all diffs, from one to another. This is why I maintain the sooner people get use to the idea of making a separate branch for each piece of work, and pull request, the faster they will make progress with working with git. This is actually the power of git, not a hindrance. But it takes time for newcomers to git to realise this ;) > > 2- Suppose it *is* possible to have all local changes and custom ports in a > single personal branch and then create pull requests when time and port are > ripe. IIRC there's a magic incantation to rebase a topic branch on the remote > origin/master (i.e. merge in remote changes on top of the changes in your > topic branch without losing its history). Of course I haven't been able to > retain that formula. It would be useful to describe the procedure on the > working-with wiki. > > Thanks, > R.
smime.p7s
Description: S/MIME cryptographic signature
