2

When I attempt to do a git clone on my git repository I get the following error:

$ git clone https://xxxxxxxxx:8081/scm/xxxxxx/xxxx-apac.git Cloning into 'xxxx-apac'... remote: Counting objects: 740, done. remote: Compressing objects: 100% (471/471), done. remote: Total 740 (delta 304), reused 466 (delta 201) Receiving objects: 100% (740/740), 5.28 MiB | 1.11 MiB/s, done. Resolving deltas: 100% (304/304), done. error: cache entry has null sha1: bin 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' /c/Users/bala/Bala/project $ cd xxxx-apac/ /c/Users/bala/Bala/project/xxxx-apac (xxxx_Apr2018) $ git branch --all * xxxx_Apr2018 remotes/origin/HEAD -> origin/xxxx_Apr2018 remotes/origin/master remotes/origin/xxxx_Apr2018 remotes/origin/xxxxx_mReleases2018 

My clone fails and the local directory is not empty. Anyway to fix

3
  • 1
    Possible duplicate of How to remove an entry with null sha1 in a Git tree Commented Jul 17, 2018 at 4:25
  • I am just doing a clone. Commented Jul 17, 2018 at 4:31
  • Can you checkout master to see if that works? Commented Jul 17, 2018 at 6:57

1 Answer 1

2

This is typical of a symbolic link or a submodule entry incorrectly added (as in this example): you can check how 'bin' is represented in the remote hosting service (GitHUb? GitLab? BitBucket) to confirm this.

If you can apply the solution from "How to remove an entry with null sha1 in a Git tree" (even in your empty working tree) and if you have the right to force push (git push --force) the result, you might be able to fix that repo for others.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.