From: Jeffrey Walton Date: Wed, 01 Jul 2020 10:45:25 GMT Subject: Re: Why won't git checkout a branch? Message-ID: In-Reply-To: <87lfk3czae.fsf@igel.home> On Wed, Jul 1, 2020 at 6:20 AM Andreas Schwab wrote: > > On Jul 01 2020, Jeffrey Walton wrote: > > > On Wed, Jul 1, 2020 at 5:50 AM Andreas Schwab wrote: > >> > >> On Jul 01 2020, Jeffrey Walton wrote: > >> > >> > $ git checkout m4 > >> > >> Try a newer git version: > >> > >> $ git checkout m4 > >> fatal: 'm4' could be both a local file and a tracking branch. > >> Please use -- (and optionally --no-guess) to disambiguate > > > > Ack, thanks. > > > > This does not look normal, either. I don't want to create a new > > branch. I want to work on the existing branch. > > To disambiguate, use `git checkout m4 --' if you want the branch, and > `git checkout -- m4' if you want the local file. Perfect, thanks. So the way to checkout that always works is to append --. Is that correct? If so, I will start using it everywhere. Jeff