git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git clone --update ?

From
ZHZenaan Harkness <zen@freedbms.net>
Date
Jan 7, 2011, 23:41 UTC
Message-ID
<AANLkTimkD6vfDMhJjuwuVrrzVVvd51_ORmp6A4V0JC9L@mail.gmail.com>
In-Reply-To
<20110107225405.GH20411@chaosreigns.com>
On Sat, Jan 8, 2011 at 09:54,  <Darxus@chaosreigns.com> wrote:
Show 9 quoted lines
> I'm working on a build script that pulls source from 12 git repos:
> http://www.chaosreigns.com/wayland/wayland-build-ubuntu-all.sh
>
> I would like to be able to do the equivalent of:
>
>  rm -rf gtk+; git clone git://git.gnome.org/gtk+ --branch gdk-backend-wayland
>
> Without re-downloading the entire thing.  Even if I made any kind of
> modifications to the repo.
Are you aware of local cloning? ie:
  git clone ../my-repos/gtk+ --branch gdk-backend-wayland
First of course, you create my-repos/ somewhere, and inside that dir, run
  git clone --bare git://git.gnome.org/$which $which.git
for each of your 12 repos that your build script will work with.
Then whilst in my-repos/, when you need to update from upstream, do:
  for i in *; do cd $i; git fetch; cd ..; done

Your build scripts can clone from your local repos as often as you like, without ever hitting the server.

But your question suggests you really have not read much git documentation or experimented much - there is a heap, and lots of it high quality. Read, do, learn.

Good luck Zen

Previous: darxus@chaosreigns.com
Message 2 of 2 in “git clone --update ?”
  1. darxus@chaosreigns.comJan 7, 2011
  2. Zenaan HarknessJan 7, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.