# git-fetch fails if remote is detached HEAD

2 messages from 2007-01-19 to 2007-01-19. Participants: Andy Parkins, Junio C Hamano.
Thread: https://gitlist.dev/t/6442

## Andy Parkins, 2007-01-19 11:44

Subject: git-fetch fails if remote is detached HEAD
Message-ID: <200701191144.35773.andyparkins@gmail.com>
URL: https://gitlist.dev/e/200701191144.35773.andyparkins%40gmail.com

```
Hello,

Running git-fetch from a remote repository that has a detached head 
fails with:

fatal: '/path/to/repository/.git': unable to chdir or not a git archive

A simple checkout at the remote end, and everything is fine again.

I can't quite see why fetch is interested in the remote HEAD at all?  
The only time that is ever needed is during a clone isn't it?


Andy
-- 
Dr Andrew Parkins, M Eng (Hons), AMIEE
andyparkins@gmail.com

```

## Junio C Hamano, 2007-01-19 22:23

Subject: Re: git-fetch fails if remote is detached HEAD
Message-ID: <7v7ivifyg7.fsf@assigned-by-dhcp.cox.net>
URL: https://gitlist.dev/e/7v7ivifyg7.fsf%40assigned-by-dhcp.cox.net
In-Reply-To: <200701191144.35773.andyparkins@gmail.com>

```
I think it is trying to see if it is a git archive, and
the version of upload-pack you are invoking is not detached-HEAD
aware.

```
