GitHub: Clone succeeded, but checkout failed

I am having some problems working with
git clone.The files are downloaded in my local git folder. Running the command

git checkout -f HEAD gives me-

  • Are Git's pack files deltas rather than snapshots?
  • Git barebones repo
  • Github, push a new project in place of an old one
  • Can't load project after pulling: “Expected 'ENCODING' but found 'utf-8'.”
  • How can I override the merge-base in a git merge?
  • Git fetch repeatedly tells me about the same new branch
  • Error:

    ‘The unable to write new index file error caused by the lack of disk space’.

    I’ve manually removed big files from my computer, but still getting the same error.

    Cloning into 'ffmpeg'...
    remote: Counting objects: 7890, done.  
    remote: Compressing objects: 100% (4412/4412), done.
    Receiving objects: 100% (7890/7890), 299.75 MiB | 24.19 MiB/s, done.
    remote: Total 7890 (delta 3346), reused 7846 (delta 3317)
    Resolving deltas: 100% (3346/3346), done.
    Checking out files: 100% (7019/7019), done.
    fatal: unable to write new index file
    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'

  • How do I manage merging and rebasing in git?
  • Get changes from master into branch in Git
  • How find most recent tag for current revision in Git/HG/Bzr?
  • how to integrate git on mplab.x
  • git rebase causes feature branch to lose tracking information
  • git repository to staging site to live site
  • 3 Solutions collect form web for “GitHub: Clone succeeded, but checkout failed”

    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:

    1. cd into the project directory and un-stage all staged files if any by running git reset
    2. 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.

    I solved the problem. It turns out that my disk was full. You can find out by running


    My result said

    $ quota
    Home Area quota for: jamie_y
    Current Usage: 8 GB
    Current Limit: 8 GB

    Run du command to find your disk usage.

    The du command shows the disk space used by the files and directories in a directory. The -h option makes the output easier to read, and the -s option summarizes the result. For example,
     du -h -s (quoted from

    Run rm -rf folderName to remove the folder/file.

    Git Baby is a git and github fan, let's start git clone.