fatal: This operation must be run in a work tree

I get this error when I try to change branch.

Probably I will give some information of the commands at

/path/to/git/repo/.

upon command:

git branch

I get following output

* V1.5
  V2.0
  master

And when I try the command

git checkout V2.0

I get following output:

fatal: This operation must be run in a work tree

config file contents:

cat config 

[core]

repositoryformatversion = 0 filemode = true bare = true

[remote “origin”]

url = /path/to/git/repo/.git

Leave a Comment