Re: managing git disk space usage - Mailing list pgsql-hackers

From Abhijit Menon-Sen
Subject Re: managing git disk space usage
Date
Msg-id 20100721115325.GA6659@toroid.org
Whole thread Raw
In response to Re: managing git disk space usage  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
At 2010-07-21 06:57:53 -0400, robertmhaas@gmail.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


pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: patch: to_string, to_array functions
Next
From: Robert Haas
Date:
Subject: Re: patch: to_string, to_array functions