Grokbase
x

Re: git?

View PostFlat  Thread  Threaded | < Prev - Next >
A. Pagaltzis Re: git?
| +1 vote
[ Profile | Reply to group ] [ Flat  Thread  Threaded ]
* H.Merijn Brand <h.m.brand@xs4all.nl> [2008-11-14 13:35]:
> On Fri, 14 Nov 2008 09:32:53 +0000, Nicholas Clark <nick@ccl4.org>
> wrote:
> > But I've heard different plans on how commits get back - is
> > it via an ssh tunnel, is it a git push (whatever that is).
>
> $ git remote add git+ssh://perl5.git.perl.org/perl.git
> :
> :
> $ git pull
> :
> :
> $ git push
>
> I think. Correct?

Roughly. But wrong on a lot of details. The remote needs a name,
and the syntax for SSH-based remotes is not URLish, but SSHish:

    git remote add origin nick@perl5.git.perl.org:perl.git

Next, git-pull is actually git-fetch (which downloads commits you
are missing) *plus* git-merge. Because of the latter, you have to
say which branch you want to merge. And since git-pull is used to
merge changes from a remote branch, and you can have several
remotes configured (it’s a DVCS!), you also have to specify which
remote, to make it unambiguous. So based on the above you’d say

    git pull origin master # or some other branch

Or you can say just

    git fetch

in which case you’ll merely slurp in all the new stuff from all
your remotes without merging any of them to your current branch
yet. The above git-pull command is equivalent to this sequence:

    git fetch origin
    git merge origin/master

If you do a git-fetch instead of a git-pull, you can do things
like

    git log ..origin

to see what’s happened in `public` without merging it yet.

Next, git-push defaults to pushing to `origin`. If your remote is
called something else (I usually set up my published repo as a
remote called `public`), you have to specify it:

    git push public

If you have push access to all of your remotes, and you want to
push to all, you can also pass `--all` instead of a particular
remote. (But you can also set up several URLs for the same remote
by editing `.git/config`, which gives you more granular choices
and seems like better option to me: I add the URLs of all public
repos to my `public` remote so they’re always pushed all at once.)

Regards,
--
Aristotle Pagaltzis // <http://plasmasturm.org/>

Thread : git?
1)
Chip Salzenberg I'm using the git mirror of the p4 repository (yay thank you gitguys), and I'm wondering whether...
2)
Michael G Schwern It's my understanding that we're waiting until after 5.8.9 so that Nick's head doesn't explode....
3)
Craig Berry I could envision some good mutual publicity from making them an "official mirror" or similar. I...
4)
Joshua Hoblitt I agree with Craig but why weren't these guys directed to the TPF proper? It seems like cooperative...
5)
David Golden Since the whole idea of "authoritative" is a bit loose in git anyway, I'd be supportive of using...
6)
A. Pagaltzis I don’t know why we couldn’t declare them both equally authoritative as long as synching is set...
7)
Leon Brocard 2008/11/13 Chip Salzenberg <chip@pobox.com>: d rom We are in the process of moving from Perforce to...
8)
Nicholas Clark One part of the documentation I know is missing is: There are no instructions on how to commit back...
9)
Tux $ git remote add git+ssh://perl5.git.perl.org/perl.git $ git pull $ git push I think. Correct? > *...
10)
A. Pagaltzis Roughly. But wrong on a lot of details. The remote needs a name, and the syntax for SSH-based...
11)
demerphq 2008/11/15 Aristotle Pagaltzis <pagaltzis@gmx.de>: Actually its both, plus scp'ish. :-) Try it. I...
12)
demerphq 2008/11/15 demerphq <demerphq@gmail.com>: I was typing too quickly: git remote add p5p...
13)
A. Pagaltzis That *is* the syntax I suggested. :-) Your example just doesn’t include a user name, which of...
14)
demerphq 2008/11/14 Léon Brocard <acme@astray.com>: Ive been on and off working on camel.booking.com, and...
spacer
View PostFlat  Thread  Threaded | < Prev - Next >
Home > Groups > Perl 5 Porters > git? (14 posts) > View Post