GitHub: Clone succeeded, but checkout failed
Got the same error when trying to clone a repo from Visual Studio 2017 (v15.6.0).
In my case installing GIT-LFS locally solved the issue.
For me this was due to long file names and doing a simple config as below resolved it
git config --system core.longpaths true
When you clone, git gets all the objects from the remote end (compressed and stashed into the .git
directory). Once it has all the pieces, it proceeds to unpack all files needed to (re)create the working directory. It is this step that fails, due to not having enough space. This might be due to a disk that is full, or a disk quota exceeded (on shared machines, quotas are often enforced to avoid having users grab more than their fair share of space).
Delete your cruft. Make sure you aren't trying to squeeze the Linux kernel or some such monster repository into your few megabytes of account space.
In my case my disk was not full and this is how I solved it:
- cd into the project directory and un-stage all staged files if any by running
git reset
- undo all changes in the working directory by running
git checkout *
After doing the two steps you should be able to see the project files.