Skip to content

Instantly share code, notes, and snippets.

@alazyer
Forked from gobinathm/shallow_update_git.md
Created June 15, 2022 01:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alazyer/22a0667551adbd386e0d325e30265433 to your computer and use it in GitHub Desktop.
Save alazyer/22a0667551adbd386e0d325e30265433 to your computer and use it in GitHub Desktop.
Fix for Remote rejected shallow update not allowed after changing Git remote URL

Some Time there is a shallow update not allowed issue in your cloned GIT repo.

This means that you have to unshallow your repository. To do so you will need to add your old remote again.

git remote add origin <path-to-old-remote> After that we use git fetch to fetch the remaining history from the old remote (as suggested in this answer).

git fetch --unshallow origin And now you should be able to push into your new remote repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment