[plt-dev] pushes & pulls & building

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

Stevie Strickland wrote:
>It seems easy enough.  I believe what you'd want to do is just
>
>1) Clone your local repo to another local repo
>   git clone /path/to/local/clone /path/to/new/clone
>2) In the new repo, pull from git:plt
>   cd /path/to/new/clone
>   git pull git:plt master
>3) Push to git:plt
>   git push git:plt master
>4) Throw away the new local repo
>   rm -rf /path/to/new/clone

Doing all this just to commit some change to the main repository
without changing my local repository doesn't fall under my definition
of "easy enough", sorry :-)

>A perhaps better way is the following:
>  git clone /path/to/local/clone /path/to/new/clone
>  cd /path/to/new/clone
>  *git remote add git-plt git:plt
>  git fetch git-plt
>  git rebase git-plt/master
>  git push git-plt master
>  rm -rf /path/to/new/clone
>
>The changed/additional steps are rebasing so that the commits you're
>adding don't cause spurious three-way merging,

I don't understand your "spurious three-way merging" comment.  Please
explain?

On a related note, I've looked at a fair amount of git documentation
lately, and I think I understand what a rebase does, but I still have
no clue why anyone would care about doing such a thing rather than
doing a simple merge (and therefore why I should care about doing a
fetch + rebase instead of doing a pull).

Philippe




Posted on the dev mailing list.