Once upon a time I forked a repo, committed against master, and couldn't figure out how to "re-sync" with upstream. I resorted to deleting the fork and starting over. I wanted a sure-fire recipe to avoid that.
Although I know a bit more about git now, I still follow that recipe. So far when I've submitted a PR, it's been for something nice-to-have not must-have on my own project. As a result, it's been OK to resume using plain old upstream master and wait for my change to get merged. So I haven't been in your situation, yet. So I don't know precisely what to recommend. Being git, there are probably a variety of ways to go about this. What I might try (but haven't verified first-hand): One-time setup: - On master, `git pull --ff-only upstream`. - On master, create from master a new branch named "my-master" (or better name). - On my-master, merge your PR branch (get its commits on my-master). Going forward, periodically: - On master, `git pull --ff-only upstream`. - On my-master, `git rebase master`. In other words, replay your commits on top of the latest upstream master. I think?? Maybe there's a simpler way to do this. As long as you create a new branch -- my-master -- you won't mess things up (and if you do, just delete it and start over). Anytime I try something brand-new with git, I make a fresh branch to experiment on. As long as no one else needs a branch -- as with your my-master branch -- there's no downside in using rebase. On Fri, Jul 3, 2015 at 5:00 AM, Tim Brown <tim.br...@cityc.co.uk> wrote: > Thanks for the help folks! > > I'll take a long hard look at rebasing before I do anything. > It sounds like something my mother would have advised against. > > On 03/07/15 03:52, Alexander D. Knauth wrote: >> >> On Jul 2, 2015, at 1:53 PM, John Clements <cleme...@brinckerhoff.org> >> wrote: >>>> >>>> On Jul 2, 2015, at 7:31 AM, Alexander D. Knauth <alexan...@knauth.org> >>>> wrote: >>>> After you resolve them you will (I think) need to `git add` the files >>>> that you resolved conflicts for, then >>>> `git rebase --continue`, and then when the rebase is finished, `git push >>>> -f origin topic-branch`. >>> >>> >>> Also, I think you eventually want to get things back onto the >>> master branch, right? After rebasing, you should be able to check >>> out masteragain, then do a >>> >>> git merge —ff-only topic-branch >>> >>> at which point you should be able to push cleanly. >> >> >> Um, I'm going by Greg Hendershott's advice in his "guide for >> infrequent contributors to Racket," but >> wouldn't you not want to do that, because that would mess up the >> master branch and make it a dirty fork? > > >> >> http://www.greghendershott.com/2013/04/a-guide-for-infrequent-contributors-to-racket.html#waiting-is-the-hardest-part > > > I'm trying to follow that. I think it's not designed for someone who > makes a tweak, is sent down the pit for a month and THEN tries to merge > back into a later master. > >>> In the meantime, you might be tempted to merge your topic branch into >>> your own master. Don’t! >>> >>> If you were to do that, your master would cease being a nice clean >>> mirror of the upstream master. Remember how no one likes a dirty >>> fork, so we’re diligently using git pull --ff-only upstream >>> master? > > > That's been well drilled into my (mostly by Greg's doc). Which is why > I'm asking before doing anything! > > Tim > > -- > Tim Brown CEng MBCS <tim.br...@cityc.co.uk> > ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ > City Computing Limited · www.cityc.co.uk > City House · Sutton Park Rd · Sutton · Surrey · SM1 2AE · GB > T:+44 20 8770 2110 · F:+44 20 8770 2130 > ──────────────────────────────────────────────────────────────────────── > City Computing Limited registered in London No:1767817. > Registered Office: City House, Sutton Park Road, Sutton, Surrey, SM1 2AE > VAT No: GB 918 4680 96 > > -- > You received this message because you are subscribed to the Google Groups > "Racket Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to racket-users+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.