# A little help with error?

2 messages from 2011-08-07 to 2011-08-10. Participants: Rusty Dog Ink, Jeff King.
Thread: https://gitlist.dev/t/28041

## Rusty Dog Ink, 2011-08-07 21:16

Subject: A little help with error?
Message-ID: <752985D1B23046F994920F9018B53DF8@rustydogink.com>
URL: https://gitlist.dev/e/752985D1B23046F994920F9018B53DF8%40rustydogink.com

```
This command. 
git add --force /Users/chris/Sites/mattSchubert/public/css/browserfix.css => "Crappy Error"
Yields this error.
fatal: '/Users/chris/Sites/mattSchubert/public/css/browserfix.css' is outside repository 
This command does gives the same error. 
git add --force /public/css/browserfix.css => "Same error"
But this command, works. Why?
git add --force public/css/browserfix.css => "Works yeah"
This is an issue since Gitbox my graphical client uses full paths for it's commands. This began happening after I use the "bundle install" command after adding 'dm-postgres-adapter' to my gem file. Ideas on fixing this?

-- 
Chris
Sent with Sparrow (http://www.sparrowmailapp.com)

```

## Jeff King, 2011-08-10 12:21

Subject: Re: A little help with error?
Message-ID: <20110810122121.GB17071@sigill.intra.peff.net>
URL: https://gitlist.dev/e/20110810122121.GB17071%40sigill.intra.peff.net
In-Reply-To: <752985D1B23046F994920F9018B53DF8@rustydogink.com>

```
On Sun, Aug 07, 2011 at 02:16:57PM -0700, Rusty Dog Ink wrote:

> git add --force /Users/chris/Sites/mattSchubert/public/css/browserfix.css => "Crappy Error"
> Yields this error.
> fatal: '/Users/chris/Sites/mattSchubert/public/css/browserfix.css' is outside repository 

We can't say if this is reasonable or not without knowing more. Which
directory are you in? Which git repository do you expect to be found?
Which repository does git actually find (try "git rev-parse --git-dir")?
Do you have GIT_WORK_TREE set in the environment, or core.worktree set
in your config?

> This command does gives the same error. 
> git add --force /public/css/browserfix.css => "Same error"
> But this command, works. Why?
> git add --force public/css/browserfix.css => "Works yeah"

The top one seems nonsensical, unless your git repository is at one of:

  /.git
  /public/.git
  /public/css/.git

The bottom one makes sense; you are looking at files in the current
directory, which is going to be inside your repository (unless you are
setting some of worktree variables I mentioned above).

Are you trying to do something clever with symlinks to /public? If so,
show us.

-Peff

```
