Take the 2-minute tour ×

When converting a JavaScript/Web project from Subversion to Git, I'm seeing a problem, even when I start over from scratch (the first Git repository is always bad).

The git svn clone works fine. From here on, pulling a bare repository looks good, but pulling a repository with working directory either from the original cloned repo or any subsequent bare repo gives the following error:

Cloning into 'R:\WebClone2'...
fatal: unable to read tree f86e35f1f083aa394cd0c28871cb5433fe9751da
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry the checkout with 'git checkout -f HEAD'

I don't see this exact combination of errors on SO. What I've done so far:

  • git fsck shows no problems, even with --full.
  • The Subversion project has empty folders. Could this be a problem? Adding .gitkeep to the empty folders in the cloned version does not repair downstream clones.
  • When I do a git status, it basically wants to delete every file and folder in the repo. If I commit, everything goes away.
  • If I instead do a git checkout, that repository becomes "good." Repos cloned from this good copy, though, show the same problem.

I'm lost. Thanks for your help.

Update: I put .gitkeep in the empty folders in Subversion, and reconverted with git svn clone - same problem.

share|improve this question
Something strange is going on. Could you post complete instructions on how to replicate this? All commands you entered, verbatim, until the problem occurs. Ideally, make the SVN repo available for us (if possible). –  sleske Feb 12 at 22:49
Also, you write about "pulling". Note that you should generally not use push/pull with a git-svn repo - only interact with SVN directly. See the git-svn manpage: "CAVEATS - For the sake of simplicity and interoperating with Subversion, it is recommended that all git svn users clone, fetch and dcommit directly from the SVN server, and avoid all git clone/pull/merge/push operations between git repositories and branches." –  sleske Feb 12 at 22:52
At any rate, the error you get ("fatal: unable to read tree") is not directly related to git-svn, it simply means that your localy git repo is corrupt. Try upgrading to the latest git, and try the whole thing on a different computer, to rule out a problem with your system. –  sleske Feb 12 at 22:56

1 Answer 1

up vote 0 down vote accepted

I was never able to dig down to the exact problem, but I found a solution:

The origin repository is on a separate machine, accessible through a mapped drive on the Windows network. When I did the clone by navigating through Windows explorer, the clone failed with the error above. But when I used Remote Desktop or logged into the machine directly with my network user and password, the clone worked fine.

The only thing I can conclude is that it's a Windows/network login permissions issue. And some of the digging down into the repo errors hinted at this as well.

Hope this helps someone in the future!

Update: someone else in the office was having the same issue cloning a repository from the network drive to their own workstation. Testing showed that:

  • Everyone else was able to clone the repository to their own machines
  • She was not able to clone with her Windows login on someone else's machine
  • Others were able to clone onto her machine with their Windows logins

This seems to support the fact that there's some sort of Windows permissions issue, rather than a corrupt repository or other Git problem.

share|improve this answer

Your Answer


