Cogito README: add a block describing team workflow with git+ssh
PATCH 1/1 Cogito README: add a block describing team workflow with git+ssh
The README doesn't talk about teams with "peer" access to a shared repo. It took me a while to figure our the /right/ way to do it. Document for future generations and general happiness.
---
README | 35 +++++++++++++++++++++++++++++++++++ 1 files changed, 35 insertions(+), 0 deletions(-)
ffd2191e527f6b7c67fa7939927a0bd30270c11a
README +35 -0
@@ -268,6 +268,41 @@ Note that we gave only a glimpse to the - merging (`cg-merge`), moving your tree to an older commit (`cg-seek`), pushing (`cg-push`), etc. +Using Cogito for Team Work +-------------------------- + +A small team with SSH access to a shared server can use Cogito in a way +similar to traditional CVS over SSH. + +If you are bootstrapping the project, and you have a local Cogito working copy, +you must set up the shared repository and push a local head to it. + +To set up the shared repository, for example in +remoteserver:/var/git, login to the remote server and do + + $ umask 002 + $ mkdir /var/git + $ chgroup gitcommit /var/git + $ chmod 2775 /var/git + $ mkdir -p /var/git/projectname.git + $ GIT_DIR=/var/git/projectname.git git-init-db + +Note: All the developers with "commit" access must belong to the gitcommit +group and have a 002 umask on the remote server. + +Going back to your Cogito working copy, run + + $ git-push remoteserver:/var/git/projectname.git master branchname + +Now your other teammembers can start working with you, doing + + $ cg-clone git+ssh://remoteserver/var/git/project.git#branchname localdir + +And when they are ready to push their work onto the shared repository, just do + + $ cg-update + $ cg-push + Understanding GIT branching and merging ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Quoted 8 lines · Martin Langhoff
The README doesn't talk about teams with "peer" access to a shared repo. It took me a while to figure our the /right/ way to do it. Document for future generations and general happiness.
Signed-off-by Martin Langhoff <[email protected]>[...]+ $ chgroup gitcommit
/var/git
s/chgroup/chgrp/
README Note that we gave only a glimpse to the · line 288
Quoted 3 lines
README +3
-0+ $ chmod 2775 /var/git + $ mkdir -p /var/git/projectname.git + $ GIT_DIR=/var/git/projectname.git git-init-db
Hmm .. if you're you're going to be using cogito anyway, might it be an idea to instead do:
$ GIT_DIR=/var/git/projectname.git/.git cg-init [-I]
?
README Note that we gave only a glimpse to the · line 295
Quoted 6 lines
README +6
-0+Note: All the developers with "commit" access must belong to the gitcommit +group and have a 002 umask on the remote server. + +Going back to your Cogito working copy, run + + $ git-push remoteserver:/var/git/projectname.git master branchname
Ditto here, tho' that'll require that remotes have been set-up, of course. ;)
Anyhow, nice howto - thanks. :)
Best,
Elfyn
Signature · 8 lines
Elfyn McBratney Gentoo Developer/Perl Team Lead beu/irc.freenode.net http://dev.gentoo.org/~beu/ +------------O.o--------------------- http://dev.gentoo.org/~beu/pubkey.asc PGP Key ID: 0x69DF17AD PGP Key Fingerprint: DBD3 B756 ED58 B1B4 47B9 B3BD 8D41 E597 69DF 17AD
Quoted 3 lines · Elfyn McBratney
Quoted 1 line
+ $ chgroup gitcommit
/var/gits/chgroup/chgrp/
Ooops! Thanks for catching that
Quoted 8 lines
README Note that we gave only a glimpse to the · line 288
Quoted 3 lines
README +3
-0+ $ chmod 2775 /var/git + $ mkdir -p /var/git/projectname.git + $ GIT_DIR=/var/git/projectname.git git-init-dbHmm .. if you're you're going to be using cogito anyway, might it be an idea to instead do:
$ GIT_DIR=/var/git/projectname.git/.git cg-init [-I]
You only really need git on the repo server, and I think that's a plus.
Quoted 4 lines
Quoted 1 line
+ $ git-push remoteserver:/var/git/projectname.git master branchname
Ditto here, tho' that'll require that remotes have been set-up, of course. ;)
Yes, the cogito way of doing this seems messy. Is there a simple way to set up the remote branch and push to it?
cheers,
martin
Quoted 6 lines · Martin Langhoff
Quoted 3 lines · Elfyn McBratney
Quoted 1 line
+ $ chgroup gitcommit
/var/gits/chgroup/chgrp/
Ooops! Thanks for catching that
Np :)
Quoted 10 lines
Quoted 8 lines
README Note that we gave only a glimpse to the · line 288
Quoted 3 lines
README +3
-0+ $ chmod 2775 /var/git + $ mkdir -p /var/git/projectname.git + $ GIT_DIR=/var/git/projectname.git git-init-dbHmm .. if you're you're going to be using cogito anyway, might it be an idea to instead do:
$ GIT_DIR=/var/git/projectname.git/.git cg-init [-I]You only really need git on the repo server, and I think that's a plus.
*nods*
Quoted 7 lines
Quoted 4 lines
Quoted 1 line
+ $ git-push remoteserver:/var/git/projectname.git master branchname
Ditto here, tho' that'll require that remotes have been set-up, of course. ;)
Yes, the cogito way of doing this seems messy. Is there a simple way to set up the remote branch and push to it?
Not that I know of, tho' I'm still quite new to cogito, mind. ;)
Best,
Elfyn
Signature · 8 lines
Elfyn McBratney Gentoo Developer/Perl Team Lead beu/irc.freenode.net http://dev.gentoo.org/~beu/ +------------O.o--------------------- http://dev.gentoo.org/~beu/pubkey.asc PGP Key ID: 0x69DF17AD PGP Key Fingerprint: DBD3 B756 ED58 B1B4 47B9 B3BD 8D41 E597 69DF 17AD