Unable to push new commit from shallow clone
Platform Notice: Server and Data Center Only - This article only applies to Atlassian products on the server and data center platforms.
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>'
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.
Ensure you are running Git 1.9+ on both server and client side.