7

I have a project for which I don't have access to the git repository any more. I want to put it in a new repository (on Bitbucket), but when I try to git push -u origin --all I get ! [remote rejected] master -> master (shallow update not allowed) for all branches.

Apparently there is a receive.shallowUpdate config option, but how do I set this on the remote side?

Making an unshallow clone isn't an option, as I don't have access to the original repo.

dhuyvetter
  • 544
  • 1
  • 7
  • 19
  • 1
    Possible duplicate of [Convert shallow clone to full clone](http://stackoverflow.com/questions/6802145/convert-shallow-clone-to-full-clone) – Whymarrh Jan 26 '16 at 20:04
  • 2
    The answer there is to fetch again using `git fetch --unshallow`, to make a non shallow clone. As I mentioned I don't have access to the repository any more, so that isn't an option. – dhuyvetter Jan 26 '16 at 20:09
  • Ah, then this should be more like it: http://stackoverflow.com/a/11381860/1267663 – Whymarrh Jan 26 '16 at 20:11
  • I tried this, but the _deep_clone_ only seems to have one branch, the last one I pulled from the old repo, and it still gives _shallow update not allowed_ – dhuyvetter Jan 26 '16 at 20:31
  • Hmm, is `deep_clone` a new repo? – Whymarrh Jan 26 '16 at 21:30

1 Answers1

19

This error message was introduced in git 1.9.0 with commit 5dbd767, and its test shows that message when pushing commits with grafted root.

If by default the remote side (here BitBucket) has left receive.shallowUpdate to its default value (false), you would need to contact its support.

But first, try and see if applying a git filter-branch -- --all is enough to transform your repo into one you can push directly (because there would be no more graft nodes)

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250