git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* just fetching HEAD of repository
@ 2007-05-21  9:01 Stian Haklev
  2007-05-21  9:08 ` Matthieu Moy
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Stian Haklev @ 2007-05-21  9:01 UTC (permalink / raw)
  To: git

After checking all the docs, I am still wondering if there is a way to
get only the last commit from a given git repository. Sometimes I
really just want the latest code so I can compile it - and let's say
they are not running gitweb, or it is not convenient to go to gitweb
and ask for a tar package to be made? This is especially relevant in
countries with slow internet connection - here in Indonesia it takes
me an hour to clone the git repository for example, never mind let's
say the Linux kernel.

Thank you
Stian

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: just fetching HEAD of repository
  2007-05-21  9:01 just fetching HEAD of repository Stian Haklev
@ 2007-05-21  9:08 ` Matthieu Moy
  2007-05-23 17:12 ` Guilhem Bonnefille
  2007-05-25 10:56 ` Jakub Narebski
  2 siblings, 0 replies; 4+ messages in thread
From: Matthieu Moy @ 2007-05-21  9:08 UTC (permalink / raw)
  To: Stian Haklev; +Cc: git

"Stian Haklev" <shaklev@gmail.com> writes:

> After checking all the docs, I am still wondering if there is a way to
> get only the last commit from a given git repository. Sometimes I
> really just want the latest code so I can compile it - and let's say
> they are not running gitweb, or it is not convenient to go to gitweb
> and ask for a tar package to be made? This is especially relevant in
> countries with slow internet connection - here in Indonesia it takes
> me an hour to clone the git repository for example, never mind let's
> say the Linux kernel.

You'll probably pay the price for not downloading the full history
later, but yes, what you're looking for is called "shallow clone", and
it's possible with the --depth option of git-clone (I personnally
never tried it, though).

Side question: once you have a shallow clone, is it possible to
"unshallow" it, that is, fetch the missing revisions?

-- 
Matthieu

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: just fetching HEAD of repository
  2007-05-21  9:01 just fetching HEAD of repository Stian Haklev
  2007-05-21  9:08 ` Matthieu Moy
@ 2007-05-23 17:12 ` Guilhem Bonnefille
  2007-05-25 10:56 ` Jakub Narebski
  2 siblings, 0 replies; 4+ messages in thread
From: Guilhem Bonnefille @ 2007-05-23 17:12 UTC (permalink / raw)
  To: Stian Haklev; +Cc: git

Are you looking for something to "shallow clone" the remote git repo
(as replyed by Matthieu, or something more similar to the "cvs export"
or "svn export" commands (ie exporting a current snapshot, not a
working repo)?

On 5/21/07, Stian Haklev <shaklev@gmail.com> wrote:
> After checking all the docs, I am still wondering if there is a way to
> get only the last commit from a given git repository. Sometimes I
> really just want the latest code so I can compile it - and let's say
> they are not running gitweb, or it is not convenient to go to gitweb
> and ask for a tar package to be made? This is especially relevant in
> countries with slow internet connection - here in Indonesia it takes
> me an hour to clone the git repository for example, never mind let's
> say the Linux kernel.
>
> Thank you
> Stian
> -
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>


-- 
Guilhem BONNEFILLE
-=- #UIN: 15146515 JID: guyou@im.apinc.org MSN: guilhem_bonnefille@hotmail.com
-=- mailto:guilhem.bonnefille@gmail.com
-=- http://nathguil.free.fr/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: just fetching HEAD of repository
  2007-05-21  9:01 just fetching HEAD of repository Stian Haklev
  2007-05-21  9:08 ` Matthieu Moy
  2007-05-23 17:12 ` Guilhem Bonnefille
@ 2007-05-25 10:56 ` Jakub Narebski
  2 siblings, 0 replies; 4+ messages in thread
From: Jakub Narebski @ 2007-05-25 10:56 UTC (permalink / raw)
  To: git

Stian Haklev wrote:

> After checking all the docs, I am still wondering if there is a way to
> get only the last commit from a given git repository. Sometimes I
> really just want the latest code so I can compile it - and let's say
> they are not running gitweb, or it is not convenient to go to gitweb
> and ask for a tar package to be made? This is especially relevant in
> countries with slow internet connection - here in Indonesia it takes
> me an hour to clone the git repository for example, never mind let's
> say the Linux kernel.

Depending on what you want, try either:

  $ git clone --depth=1 <repository URL>

or

  $ git archive --remote=<repository URL> HEAD

(if the remote side supports it)
-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-05-25 10:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-21  9:01 just fetching HEAD of repository Stian Haklev
2007-05-21  9:08 ` Matthieu Moy
2007-05-23 17:12 ` Guilhem Bonnefille
2007-05-25 10:56 ` Jakub Narebski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).