News for hackers. Stuff that matters.
Re:Flight rules for Git – What to do when things go wrong by lmm on Tuesday July 29, 2014 @12:24PM (#8103091)
I'm not sure you need a "workflow". In the case of a complex divergence on branch "foo" my procedure would be:

0. Be on local branch "foo". If you've just tried to pull and got conflicts, abort the merge. (Note that for this to work reliably, you should never pull without first committing or stashing your changes):

    git merge --abort
1. Create a new branch "m":

    git checkout -b m
2. Merge origin into m, in several pieces if necessary:

    git merge origin/foo
    git merge [hash of some intermediate commit on origin/foo]
3. Once you're happy with all this, switch back to foo and merge it, and push it upstream

    git checkout foo
    git merge m
    git branch -d m
    git push

There are no comments on this comment yet.