why is Git pull throws an error: cannot be used without a working tree-Collection of common programming errors
I have installed Git version 1.7.6.msysgit.0 on our Windows 2003 Server (SP2). This is our main repository for 14 developers.
I am trying to create a backup from this repository. The way I am trying is: I made a clone of this repo on our backup server:
cd to/my/backup/git/folder.git
git clone z:/GIT/Lib.git .
I am now trying to pull changes from the main repository, but I get the following error
git pull
Fatal: ... git-clone cannot be used without a working tree
The config file under Z:/GIT/Lib.git is:
Z:\GIT\Lib.git>more config
[core]
repositoryformatversion = 0
filemode = false
bare = true
symlinks = false
ignorecase = true
hideDotFiles = dotGitOnly
[remote "origin"]
url = //NAS/GIT/Lib
Running
git status
throws the same error.
I thought the problem was with the :
bare=true
so I changed it, but did not change the result.
I will NEVER work on the backup folders ( I have 4 repos now under z:/GIT/ – and all need to be backed up in the same way – or somehow)
This article mentions that I need this work-tree, but if I set it, can I have the other repos pulled as well?
The question can be asked also in another format as: What is the best way to make a GIT backup ?