# Confusing error message from "git pull" when upstream repo no longer exists

3 messages from 2010-06-29 to 2010-06-29. Participants: Per Cederqvist, Santi Béjar.
Thread: https://gitlist.dev/t/24230

## Per Cederqvist, 2010-06-29 10:33

Subject: Confusing error message from "git pull" when upstream repo no longer exists
Message-ID: <op.ve14xqlq0i1pst@centurion>
URL: https://gitlist.dev/e/op.ve14xqlq0i1pst%40centurion

```
When running "git pull", I get this error message:

     fatal: /usr/local/libexec/git-core/git-pull cannot be used without a  
working tree.

"git fetch" gives me a much clearer error message:

     fatal: '/var/git/project.git' does not appear to be a git repository
     fatal: The remote end hung up unexpectedly

/var/git/project.git does no longer exist on the origin server, so I
understand why the commands fail.  I think "git pull" should have a
less confusing error message, though.

     /ceder
-- 
Per Cederqvist, cederp@opera.com

```

## Santi Béjar, 2010-06-29 10:55

Subject: Re: Confusing error message from "git pull" when upstream repo no longer exists
Message-ID: <AANLkTilbqmedF9Wh3dG3n9HYtuZuq4PzTwOp6T8NCjQ8@mail.gmail.com>
URL: https://gitlist.dev/e/AANLkTilbqmedF9Wh3dG3n9HYtuZuq4PzTwOp6T8NCjQ8%40mail.gmail.com
In-Reply-To: <op.ve14xqlq0i1pst@centurion>

```
On Tue, Jun 29, 2010 at 12:33 PM, Per Cederqvist <cederp@opera.com> wrote:
> When running "git pull", I get this error message:
>
>    fatal: /usr/local/libexec/git-core/git-pull cannot be used without a
> working tree.

This error message is shown when you try to pull in a bare repository
(without a working tree). It seems you don't have a working tree, but
you have a repository, so you can still fetch. (the working tree check
is done before the fetch).

HTH,
Santi

```

## Per Cederqvist, 2010-06-29 11:14

Subject: Re: Confusing error message from "git pull" when upstream repo no longer exists
Message-ID: <op.ve16un100i1pst@centurion>
URL: https://gitlist.dev/e/op.ve16un100i1pst%40centurion
In-Reply-To: <AANLkTilbqmedF9Wh3dG3n9HYtuZuq4PzTwOp6T8NCjQ8@mail.gmail.com>

```
On Tue, 29 Jun 2010 12:55:29 +0200, Santi Béjar <santi@agolina.net> wrote:

> On Tue, Jun 29, 2010 at 12:33 PM, Per Cederqvist <cederp@opera.com>  
> wrote:
>> When running "git pull", I get this error message:
>>
>>    fatal: /usr/local/libexec/git-core/git-pull cannot be used without a
>> working tree.
>
> This error message is shown when you try to pull in a bare repository
> (without a working tree). It seems you don't have a working tree, but
> you have a repository, so you can still fetch. (the working tree check
> is done before the fetch).
>
> HTH,
> Santi

Oh. You are correct. I was in a bare repository, so I guess the message
is good after all. Sorry for my mistaken report.

     /ceder
-- 
Per Cederqvist, cederp@opera.com

```
