Unable to push new commit from shallow clone

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform Notice: Server and Data Center Only - This article only applies to Atlassian products on the server and data center platforms.

Problem

When trying to push new commits in a shallow clone to Bitbucket Server, the following error is returned:

fatal: protocol error: expected old/new/ref, got 'shallow <commit hash>'

Cause

When pushing commits from the command line from a local repository created from shallow clones, the push fails with the abovementioned protocol error. This functionality was added in Git version 1.9.

Resolution

Ensure you are running Git 1.9+ on both server and client side.

Last modified on Sep 15, 2016

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.