Re: [PATCH 3/3] builtin/checkout: DWIM with -f -b
From: Jeff King <hidden>
Date: 2016-06-15 22:48:59
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