> Can you describe your "patch queue"-like workflow using git? git rebase -i > lets you reorder commits, but how do you quickly do the equivalent of hg > qpopping and qpushing a bunch of commits?
qpop && qpush is a nop, of course; what do you want to in-between those two commands? I have a |git qrebase| command which does |git rebase -i| on my whole "patch queue". The "patch queue" is defined as the set of commits in the range $(git qparent)..HEAD, where |git qparent| is the first common ancestor between HEAD and |git tracks| (i.e., |git merge-base $(git tracks) HEAD|). |git tracks| is defined as the upstream branch that the current branch tracks (as set by |git branch -u| in newer versions of git). All of these commands are defined in my git-tools repository. https://github.com/jlebar/moz-git-tools As an example, to qpop your patch queue so that commit X is the new head, then add a new patch on top of X, then re-apply your patch queue, you'd do |git qrebase|, then mark commit X as "edit", then |git commit| your new patch, then |git rebase --continue|. This is better than hg in a number of ways, but among them is the fact that the old state of your patch queue is not lost for 90 days or so. If you discover that you screwed up and want to go back to the old version of the patch queue, you merely need to look through |git reflog| and then |git reset --hard Z| where Z is the commit you were at before you rebased. This is in contrast to hg, where |hg qref| is destructive and can cause you to lose work (unless you're versioning your patch queue, which is a whole other can of worms). On Wed, Jul 10, 2013 at 6:49 PM, Chris Peterson <cpeter...@mozilla.com> wrote: > On 7/10/13 3:01 PM, Justin Lebar wrote: >>> >>> I can't see how they are a good alternative. With patch queues, I can >>> maintain a complex refactoring in a patch queue >>> containing dozens of smallish patches. In particular, I can easily >>> realize I made a mistake in patch 3 while working on patch >>> 21 and make sure that the fix ends up in patch 3; I don't see how that is >>> easily achievable in git branches. >> >> >> This is far easier to achieve in git than with mq. > > > Can you describe your "patch queue"-like workflow using git? git rebase -i > lets you reorder commits, but how do you quickly do the equivalent of hg > qpopping and qpushing a bunch of commits? I use _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform