There are a lot of answers stating that git 1.9 removes limitations of shallow clones. Nevertheless, I'm using 2.6.1 and still having the following basic issue:
First, I create an empty repo somewhere:
cd /tmp
mkdir target
cd target
git init
Then, I shallow clone some repo and add the above repo as remote:
cd /tmp
git clone --depth 1 git@github.com:muennich/urxvt-perls.git
cd urxvt-perls
git remote add target /tmp/target
Finally, I push this repo to the remote:
git push target master
But then I get:
! [remote rejected] master -> master (shallow update not allowed)
error: failed to push some refs to '/tmp/target'
What am I missing here?