Skip to content

Instantly share code, notes, and snippets.

@hbons
Created January 14, 2015 16:45
Show Gist options
  • Save hbons/c97ee57c6738ab2c511e to your computer and use it in GitHub Desktop.
Save hbons/c97ee57c6738ab2c511e to your computer and use it in GitHub Desktop.
git fetch --update-shallow
@gerhard-tinned
Copy link

The git man page of git-clone does not state it but Linux git-clone man pages state this.

--depth
Create a shallow clone with a history truncated to the specified
number of revisions. A shallow repository has a number of
limitations (you cannot clone or fetch from it, nor push from nor
into it
), but is adequate if you are only interested in the recent
history of a large project with a long history, and would want to
send in fixes as patches.

@gerhard-tinned
Copy link

Sparkleshare git version 1.8.1.3
Mac OS X git version 2.2.1

Server git version 1.7.1
... there is no newer version in the centos repositories.

@gerhard-tinned
Copy link

It seems that git 2.2.1 does not allow pushing a shallow repository to a git 1.7.1 server.

It seems to work with the 1.8.1.3 client to push to the 1.7.1 server. :)

@gerhard-tinned
Copy link

Manually downgraded/switched to 1.8 version of git via homebrew.

$ brew switch git 1.8.5.2

That solved the issue. Thanks.

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