Merge branch 'maint'
[gc-utils.git] / README
blob373c045644278b094b7bc7bebf6dc335bdd0bf72
1                                         README
2                                        gc-utils
3                                                          
4 1. Introduction
5 gc-utils is a small set of shell scripts that manages a git repository 
6 that was imported from cvs. The scripts makes it easy for the user to 
7 keep their git repository up-to-date as well as commiting changes  
8 back into cvs.
10 2. How to install gc-utils
11 Extract the *.tar.gz. 
13  $ tar xzvf gc-utils.tar.gz
15 Switch into the directory and make install using a prefix (usually /usr)
17  $ make prefix=/usr 
19 Then install as root
21  $ sudo make prefix=/usr install
23 You can now use the gc-import, gc-update and gc-commit commands as well as 
24 the corresponding manpages.
26 3. How to use gc-utils
28  2.1 Import from a CVS
29  To import from a cvs tell gc-import where to fetch from and what to fetch
31    $ gc-import -d myproj.git -v -m -u :ext:foo@example.com:/cvsroot myproject
32   
33  Will create a git repository in myproj.git and import the myproject module
34  from the example.com/cvsroot cvs.
35  The -v options turns on verbosity, while -m tries to merge commits based
36  on commit messages. This is usually usefull.
37  The -u options converts cvs tags with underscores into git tags with dots.
38  e.g. FOO_1_0 will be FOO.1.0.
41  2.2 Keep you git up to date
42  You usually want to keep your git repository up to date with the changes
43  made in the cvs. To do so, go into you git repository and run gc-update.
45    $ cd myproj.git
46    $ gc-update
48  This command will do all the necesary steps.
50  Please notice that this works only with projects previously imported using
51  gc-import.
53  2.3 Commit changes back to cvs
54  You imported the cvs repos into a git repository and you made some changes
55  on your personal git and want to contribute back into cvs.
57  Therefore you need the SHA1 identifiers of the commits you did in your
58  git. Just run git-log to see the sha1.
60    $ cd myproj.git
61    // edit foo.c and commit
62    $ git-log
63    // foo.c commited was commit feca43......
64    $ gc-commit -c feca43
65    
66  The -c option will cause gc-commit to do the actual commit into cvs.
67  Without that ption gc-commit just patches the cvs and echos the 
68  command you have to execute to commit.
70 3. How gc-utils deal with your repository
71 gc-utils creates a git repository and then imports the cvs into a 
72 .cvs directory in the git repository. Therefore it knows always where the
73 .cvs working copy resides and can easily use the git-cvs* tools to do 
74 the job of commiting and updating.
76 4. Known bugs
77 None yet
79 5. Author
80 David Soria Parra <dsp@php.net>