0

I am trying to do a shallow clone on a large repo and push it to a new destination.

I have done a shallow clone using:

git clone --depth 100 URL

but when I try to push it using:

git push --mirror URL

But I keep getting an error message - "error: failed to push some refs to".

dc2023
  • 3
  • 1

1 Answers1

0

This indicates that another user has pushed a commit to the branch you are pushing to, but that commit hasn't yet arrived on your laptop. This may occur if you haven't recently used "git pull" on a branch with a large number of contributors, like staging. To fix this issue, run:

  1. git pull origin ****your-branch
  2. git push origin ****your-branch