From: Jeff King Date: Sun, 20 Jun 2010 21:16:05 GMT Subject: Re: [PATCH 3/3] builtin/checkout: DWIM with -f -b Message-ID: <20100620211605.GA2559@sigill.intra.peff.net> In-Reply-To: <7vpqzltnp3.fsf@alter.siamese.dyndns.org> On Sun, Jun 20, 2010 at 02:10:32PM -0700, Junio C Hamano wrote: > FWIW, I often end up doing this when rebuilding 'pu' (and 'jch' that is > used internally that keeps a version of 'next' with cleaner history). > > ... a script to regenerate jch on top of master (and pu on jch) > $ Meta/Reintegrate master..jch >Meta/redo-jch.sh > $ Meta/Reintegrate jch..pu >Meta/redo-pu.sh > > ... rewind and rebuild jch on top of updated master > $ git checkout -f -b jch master > ... error ... oops > $ git branch -f jch master > $ git checkout jch > $ Meta/redo-jch.sh > $ git diff next > ... no output---good. I'm certainly sympathetic, but as I understand it, with this new patch you are doing the equivalent of: git branch -f jch master git checkout -f jch which is different than what you wrote above. For your workflow, I doubt it matters, but it is potentially destructive. -Peff