0

i have a little problem with a git server repository. On every command line input i got the following error:

fatal: This operation must be run in a work tree

On example i get this error on ls -la or mkdir.

I initialized this repo with git init --bare and i have this problem on one server and i don't know why. The server runs on Debian Squeeze.

Here the repo config file:

[core]
        repositoryformatversion = 0
        filemode = true
        bare = true

I hope you can help me.

greenchapter
  • 140
  • 1
  • 2
  • 13
  • You're in a *bare* repository so many of the commands are not available or require special flags. See for example: http://stackoverflow.com/q/11377827/440302 – Rufflewind Aug 19 '14 at 14:44
  • the problem is on other machines i have no errors and i don't understand why. – greenchapter Aug 19 '14 at 14:46
  • Do you have a [custom shell prompt](https://en.wikibooks.org/wiki/Guide_to_Unix/Explanations/Shell_Prompt)? – Rufflewind Aug 19 '14 at 14:50
  • i have on all machines oh-my-zsh i think this isn't the Problem – greenchapter Aug 19 '14 at 14:51
  • You said it affects *all commands* (i.e. even non-git ones)? Does it occur in another shell? – Rufflewind Aug 19 '14 at 14:55
  • I think the problem is the agnoster theme from oh-my-zsh. – greenchapter Aug 21 '14 at 13:31
  • Agnoster's theme has a custom prompt designed for Git, so chances are that it fails to realize it's a bare repository and attempts to use Git commands on it. (The curious part is why it seems to work on your other computers.) Perhaps you should report this as a bug? – Rufflewind Aug 21 '14 at 18:50
  • Yes its curious. I openend a issue in github for this bug, problem whatever. I think this is the combination of system, git and oh-my-zsh that throws this error. On all other machines runs debian 7 – greenchapter Aug 23 '14 at 10:41

0 Answers0