Git errors failing the build when deploying to Heroku

Has there been any updates on this issue? Just ran into it as well. I tried the fix above to no avail. Also tried rebuilding without the cache. We are using circle ci to deploy to our staging app on heroku, instead of production.

This is the error:

[[ ! -s "$(git rev-parse --git-dir)/shallow" ]] || git fetch --unshallow returned exit code 128

fatal: error in object: unshallow <SHA> Action failed: [[ ! -s "$(git rev-parse --git-dir)/shallow" ]] || git fetch --unshallow

Here is the deployment portion of my circle.yml:

deployment:
  staging:
    branch: master
    commands:
      - "[[ ! -s \"$(git rev-parse --git-dir)/shallow\" ]] || git fetch --unshallow"
      - git push git@heroku.com:<APP NAME> $CIRCLE_SHA1:refs/heads/master