Mark Satterfield
Mark Satterfield

Reputation: 83

How to git the most recent snapshot of a google code repository (not a clone)

So I'm working with code.google.com for the first time, and with git for the first time.

I understand how to create a clone for development purposes, but how do I just git the most recent snapshot (HEAD?) of a repository?

The use case here is: I'm working on one system for development, and I build another system for testing (or I have other people doing testing). I just want to wget the most recent committed files on this new system.

Upvotes: 1

Views: 73

Answers (1)

xaizek
xaizek

Reputation: 5252

Then just clone only one revision with git clone. Like this:

git clone --depth 1 <clone URL>

--depth 1 tells git to fetch only HEAD.

From git help clone:

--depth <depth>
           Create a shallow clone with a history truncated to the specified number of revisions.
...

Upvotes: 2

Related Questions