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-

  • “Internal error” when pushing to Heroku
  • How do I resolve git merge conflicts on a submodule from `git stash pop`
  • git svn - Unrecognized URL scheme error
  • “Cherry-pick” in Github App for Mac
  • Git commit unknown Author
  • How to resolve git conflicts on branch without merging or rebasing
  • 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'
    

  • Does EGit “Revert Commit” permanently delete the original commit?
  • Eclipse Luna git checkout ssl fails
  • How to update a git shallow clone?
  • Change the user picture for Git in Xcode
  • Pushing To Heroku Fails - No Such App Fatal
  • GIT: forgot to commit and have made new changes. How to undo new changes, commit then redo changes?
  • 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

    quota
    

    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 http://linux.about.com/od/commands/a/blcmdl1_dux.htm)
    

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

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