Skip to content

Commit 4cfeccc

Browse files
bfieldsJunio C Hamano
authored andcommitted
Documentation: simpler shared repository creation
Take Johannes Schindelin's suggestions for a further simplification of the shared repository creation using git --bare init-db --shared, and for a simplified cvsimport using an existing CVS working directory. Also insert more man page references. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> cvs-migration.txt | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) Signed-off-by: Junio C Hamano <junkio@cox.net>
1 parent 90ffefe commit 4cfeccc

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

Documentation/cvs-migration.txt

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ Pull: refs/heads/master:refs/remotes/origin/master
4343
------------
4444
================================
4545

46-
You can update the shared repository with your changes by first commiting
47-
your changes, and then using:
46+
You can update the shared repository with your changes by first committing
47+
your changes, and then using the gitlink:git-push[1] command:
4848

4949
------------------------------------------------
5050
$ git push origin master
@@ -76,11 +76,15 @@ possibly created from scratch or from a tarball (see the
7676
link:tutorial.html[tutorial]), or imported from an already existing CVS
7777
repository (see the next section).
7878

79-
If your project's working directory is /home/alice/myproject, you can
80-
create a shared repository at /pub/repo.git with:
79+
Assume your existing repo is at /home/alice/myproject. Create a new "bare"
80+
repository (a repository without a working tree) and fetch your project into
81+
it:
8182

8283
------------------------------------------------
83-
$ git clone -bare /home/alice/myproject /pub/repo.git
84+
$ mkdir /pub/my-repo.git
85+
$ cd /pub/my-repo.git
86+
$ git --bare init-db --shared
87+
$ git --bare fetch /home/alice/myproject master:master
8488
------------------------------------------------
8589

8690
Next, give every team member read/write access to this repository. One
@@ -93,10 +97,7 @@ Put all the committers in the same group, and make the repository
9397
writable by that group:
9498

9599
------------------------------------------------
96-
$ cd /pub
97-
$ chgrp -R $group repo.git
98-
$ find repo.git -mindepth 1 -type d |xargs chmod ug+rwx,g+s
99-
$ GIT_DIR=repo.git git repo-config core.sharedrepository true
100+
$ chgrp -R $group /pub/my-repo.git
100101
------------------------------------------------
101102

102103
Make sure committers have a umask of at most 027, so that the directories
@@ -107,15 +108,15 @@ Importing a CVS archive
107108

108109
First, install version 2.1 or higher of cvsps from
109110
link:http://www.cobite.com/cvsps/[http://www.cobite.com/cvsps/] and make
110-
sure it is in your path. The magic command line is then
111+
sure it is in your path. Then cd to a checked out CVS working directory
112+
of the project you are interested in and run gitlink:git-cvsimport[1]:
111113

112114
-------------------------------------------
113-
$ git cvsimport -v -d <cvsroot> -C <destination> <module>
115+
$ git cvsimport -C <destination>
114116
-------------------------------------------
115117

116118
This puts a git archive of the named CVS module in the directory
117-
<destination>, which will be created if necessary. The -v option makes
118-
the conversion script very chatty.
119+
<destination>, which will be created if necessary.
119120

120121
The import checks out from CVS every revision of every file. Reportedly
121122
cvsimport can average some twenty revisions per second, so for a

0 commit comments

Comments
 (0)