[kwlug-disc] how to start and use a shared git repo in place?

Robert P. J. Day rpjday at crashcourse.ca
Tue Feb 23 06:23:28 EST 2010


  i suspect i should know how to do this, but it's the first time i've
tried to initialize a git repository in place on top of existing
content so that it could be used by multiple people and i think there
may be more to it than i originally thought.

  for sample content, let me copy, say, /etc/sysconfig to ~/sysco,
then:

$ cd sysco
$ ls     (typical contents of /etc/sysconfig on fedora 12)

now turn the content into a git repository in place:

$ git init
Initialized empty Git repository in /home/rpjday/sysco/.git/
$ git add .     (add all that content to the index)
$ git commit	(and commit it all as the first commit)
$

  the git log shows me that it worked as this is the entire output of
"git log":

$ git log
commit 4054b7d24909f97e01c8a2b060963b3602cce802
Author: Robert P. J. Day <rpjday at localhost.localdomain>
Date:   Tue Feb 23 06:18:59 2010 -0500

    initial commit.
$

  at this point, what's the preferred method of working with this
content/repo if i want to be able to make changes/adds, commits, but
also be able to checkout back to earlier commits *and* share that repo
with others?

  i suspect it's not just allowing multiple people to work in the
directory simultaneously.  i suspect it will involve having different
users create their own branches.  but i'd rather not have everyone
have to clone their own working copies since that would defeat the
purpose of having created the repo on top of that existing content.

  is there a preferred way of doing this?  thanks.

rday
--

========================================================================
Robert P. J. Day                               Waterloo, Ontario, CANADA

            Linux Consulting, Training and Kernel Pedantry.

Web page:                                          http://crashcourse.ca
Twitter:                                       http://twitter.com/rpjday
========================================================================




More information about the kwlug-disc mailing list