Re: managing git disk space usage

From: Abhijit Menon-Sen <ams(at)toroid(dot)org>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: managing git disk space usage
Date: 2010-07-21 11:53:25
Message-ID: 20100721115325.GA6659@toroid.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

At 2010-07-21 06:57:53 -0400, robertmhaas(at)gmail(dot)com wrote:
>
> Post 'em here or drop them on the wiki and post a link.

1. Clone the remote repository as usual:

git clone git://git.postgresql.org/git/postgresql.git

2. Create as many local clones as you want:

git clone postgresql foobar

3. In each clone (supposing you care about branch xyzzy):

3.1. git remote origin set-url ssh://whatever/postgresql.git

3.2. git remote update && git remote prune

3.2. git checkout -t origin/xyzzy

3.4. git branch -d master

3.5. Edit .git/config and set origin.fetch thus:

[remote "origin"]
fetch = +refs/heads/xyzzy:refs/remotes/origin/xyzzy

(You can git config remote.origin.fetch '+refs/...' if you're
squeamish about editing the config file.)

3.6. That's it. git pull and git push will work correctly.

(This will replace the "origin" remote that pointed at your local
postgresql.git clone with one that points to the real remote; but you
could also add a remote definition named something other than "origin",
in which case you'd need to "git push thatname" etc.)

-- ams

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2010-07-21 11:58:52 Re: patch: to_string, to_array functions
Previous Message Alexander Korotkov 2010-07-21 11:40:33 Re: multibyte charater set in levenshtein function