# nit: missing branch error message

3 messages from 2005-09-16 to 2005-09-19. Participants: Jeff Garzik, Junio C Hamano, Linus Torvalds.
Thread: https://gitlist.dev/t/1819

## Jeff Garzik, 2005-09-16 06:35

Subject: nit: missing branch error message
Message-ID: <432A67C3.2010205@pobox.com>
URL: https://gitlist.dev/e/432A67C3.2010205%40pobox.com

```
Just tried accidentally to check out a non-existent branch:

> [jgarzik@pretzel libata-dev]$ git checkout -f upstream
> fatal: Needed a single revision

> [jgarzik@pretzel libata-dev]$ ls .git/refs/heads/
> adma      chs-support  master    pata-drivers       sil24-original  vsc-mwi
> adma-mwi  iomap        ncq       promise-sata-pata  sil-lbt
> ALL       iomap-step1  passthru  sil24              upstream-fixes

Better error message would be "hey dummy, branch doesn't exist"

	Jeff

```

## Junio C Hamano, 2005-09-16 23:09

Subject: Re: nit: missing branch error message
Message-ID: <7vhdckfw40.fsf@assigned-by-dhcp.cox.net>
URL: https://gitlist.dev/e/7vhdckfw40.fsf%40assigned-by-dhcp.cox.net
In-Reply-To: <432A67C3.2010205@pobox.com>

```
Jeff Garzik <jgarzik@pobox.com> writes:

>> [jgarzik@pretzel libata-dev]$ git checkout -f upstream
>> fatal: Needed a single revision
>
> Better error message would be "hey dummy, branch doesn't exist"

Thanks.

```

## Linus Torvalds, 2005-09-19 17:06

Subject: Re: nit: missing branch error message
Message-ID: <Pine.LNX.4.58.0509191005040.9106@g5.osdl.org>
URL: https://gitlist.dev/e/Pine.LNX.4.58.0509191005040.9106%40g5.osdl.org
In-Reply-To: <7vhdckfw40.fsf@assigned-by-dhcp.cox.net>

```


On Fri, 16 Sep 2005, Junio C Hamano wrote:

> Jeff Garzik <jgarzik@pobox.com> writes:
> 
> >> [jgarzik@pretzel libata-dev]$ git checkout -f upstream
> >> fatal: Needed a single revision
> >
> > Better error message would be "hey dummy, branch doesn't exist"
> 
> Thanks.

Hell no.

I'm pissed.

	[torvalds@g5 linux]$ git checkout -b st-5481 0677b284b827fbac20961037982f2a6459a827a8
	hey dummy, branch '0677b284b827fbac20961037982f2a6459a827a8' doesn't exist.

This f*cking message needs to go! The old message may have been confused, 
but it was confused for a really good reason. The new message shows that 
you didn't understand what "git checkout" does.

		Linus

```
