threads / discuss / 28041

A little help with error?

Subject: A little help with error?

## tl;dr

2 messages between Aug 7, 2011 and Aug 10, 2011.

replies: 1people: 2as markdown or json

Rusty Dog Ink· Aug 7, 2011, 21:16 UTC · lore

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· Aug 10, 2011, 12:21 UTC · re: Rusty Dog Ink · lore

Re: A little help with error?

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

← back to recent threads