[plt-dev] pushes & pulls & building

From: Philippe Meunier (meunier at ccs.neu.edu)
Date: Wed Apr 28 06:39:07 EDT 2010

Stevie Strickland wrote:
>On Apr 27, 2010, at 4:14 PM, Robby Findler wrote:
>> For some context: I was hoping that gits fanciness would allow me to
>> have some kind of intermediary between the public repository and my
>> various machines. That is, I imagine something where I can let my
>> laptop and my machine at home talk to my machine at work so that
>> changes I make can be visible in all three places without having to
>> make them public to the whole world.
>
>I currently do this.  The way I do this is the following:
>
>1) Create a clone of the PLT tree in my usr.  For example,
>
>  ssh git.racket-lang.org fork plt usr/sstrickl/plt
>
>2) Use that as the origin for clones on my machines.  On each machine, I do:
>
>  git clone git.racket-lang.org:usr/sstrickl/plt
>
>3) Add a remote for the official PLT repo for convenience in each such repo.
>
>  git remote add git-plt git.racket-lang.org:plt
>
>4) When I need to pull in changes made by others on the main repo, I do:
>
>  git fetch git-plt
>  git merge git-plt/master
>  git push
>
>which takes the new changes from the main git repo and applies them to my copy.

So you get new changes from the main repo to your local repo across
the internet, then push these changes across the internet from your
local repo to your private copy of the main repo on the main git
server, and then later you'll sit in front of your laptop computer and
pull again all the changes across the internet from your private copy
of the main repo on the main git server to your local repo on your
laptop.  Do I get this right?

Is there a process that's a bit more network-optimized?  Like:
remotely get the new changes from the main repo on the main git server
to my private copy of the main repo on the main git server, then
simply pull the result to my local repo by doing a 'git pull' as
usual, then simply pull those changes to my laptop (by doing a 'git
pull my-local-desktop:path/to/repo master' or some other incantation
like that)?

In fact it looks to me like, rather then going through a private copy
of the main repo that sits on the main git server, what I should
really do is have my own local public git server.  Then I can use it
to synchronize things between machines locally, break any code I want,
pull new changes from the main repo whenever I want, and only push
from that server to the main repo when I'm ready.  In other words,
move to a truly distributed system for which git was designed rather
than trying to shoe-horn git into something that looks like svn?

Philippe




Posted on the dev mailing list.