Re: [PATCH v3 10/21] checkout: split part of it to new command 'switch'
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 13, 2019, 01:55 UTC
- Message-ID
- <xmqqo96ffsgs.fsf@gitster-ct.c.googlers.com>
- In-Reply-To
- <CAPig+cSe-v-GU=UG_PyUjf9itz_Ddqq4-Ni4h=2TtbLDXr5WJA@mail.gmail.com>
Eric Sunshine <sunshine@sunshineco.com> writes:
Show 8 quoted lines
>> Do you use checkout -B only when checkout -b fails, or do you use it >> pre-emptively? The former would suggest we should use a name like >> --recreate, while the latter would suggest a name more like >> --force-create. > > It doesn't come up often, but I use "git checkout -B" when I know that > I want to start an existing branch over from scratch to build upon > some unrelated branch.
FWIW, I always use "checkout -B" at least twice during an integration cycle. "git checkout -B jch master" before rebuilding my private edition with select topics (including all the topics already in 'next'), plus "git checkout -B pu jch" before rebuilding the 'pu' branch with the other topics I happen to have looked at. These are similar to your use case---the branches have constant "purpose" and always exist, but they are rebuilt from scratch when they get updated.