Pull updates with git after cloned with --depth 1
I think you can use --depth 1
in git pull
too, so it gets just what's needed for the newest commit in the repository.
I don't know if the default behaviour is to pull everything missing, because my git help pull
shows this option:
git pull --unshallow
or
git fetch --unshallow
--unshallow Convert a shallow repository to a complete one, removing all the limitations imposed by shallow repositories.
I'm running git version 1.8.5.2 (Apple Git-48)
, and maybe this is some sort-of-new behaviour, and changing a bit between versions.
Could any of the new commits be merge-commits pointing to commits not present in your tree? Perhaps --depth 1000
would work better and still be small enough.