diff options
Diffstat (limited to 'Documentation/gitcvs-migration.txt')
-rw-r--r-- | Documentation/gitcvs-migration.txt | 36 |
1 files changed, 21 insertions, 15 deletions
diff --git a/Documentation/gitcvs-migration.txt b/Documentation/gitcvs-migration.txt index 1db3f52945..aeb0cdc973 100644 --- a/Documentation/gitcvs-migration.txt +++ b/Documentation/gitcvs-migration.txt @@ -7,7 +7,8 @@ gitcvs-migration - git for CVS users SYNOPSIS -------- -git cvsimport * +[verse] +'git cvsimport' * DESCRIPTION ----------- @@ -18,9 +19,9 @@ important than any other. However, you can emulate the CVS model by designating a single shared repository which people can synchronize with; this document explains how to do that. -Some basic familiarity with git is required. This -linkgit:gittutorial[7][tutorial introduction to git] and the -linkgit:gitglossary[7][git glossary] should be sufficient. +Some basic familiarity with git is required. Having gone through +linkgit:gittutorial[7] and +linkgit:gitglossary[7] should be sufficient. Developing against a shared repository -------------------------------------- @@ -34,7 +35,7 @@ $ git clone foo.com:/pub/repo.git/ my-project $ cd my-project ------------------------------------------------ -and hack away. The equivalent of `cvs update` is +and hack away. The equivalent of 'cvs update' is ------------------------------------------------ $ git pull origin @@ -46,28 +47,28 @@ them first before running git pull. [NOTE] ================================ -The `pull` command knows where to get updates from because of certain -configuration variables that were set by the first `git clone` +The 'pull' command knows where to get updates from because of certain +configuration variables that were set by the first 'git clone' command; see `git config -l` and the linkgit:git-config[1] man page for details. ================================ You can update the shared repository with your changes by first committing -your changes, and then using the linkgit:git-push[1] command: +your changes, and then using the 'git push' command: ------------------------------------------------ $ git push origin master ------------------------------------------------ to "push" those commits to the shared repository. If someone else has -updated the repository more recently, `git push`, like `cvs commit`, will +updated the repository more recently, 'git push', like 'cvs commit', will complain, in which case you must pull any changes before attempting the push again. -In the `git push` command above we specify the name of the remote branch -to update (`master`). If we leave that out, `git push` tries to update +In the 'git push' command above we specify the name of the remote branch +to update (`master`). If we leave that out, 'git push' tries to update any branches in the remote repository that have the same name as a branch -in the local repository. So the last `push` can be done with either of: +in the local repository. So the last 'push' can be done with either of: ------------ $ git push origin @@ -81,8 +82,8 @@ Setting Up a Shared Repository ------------------------------ We assume you have already created a git repository for your project, -possibly created from scratch or from a tarball (see the -linkgit:gittutorial[7][tutorial]), or imported from an already existing CVS +possibly created from scratch or from a tarball (see +linkgit:gittutorial[7]), or imported from an already existing CVS repository (see the next section). Assume your existing repo is at /home/alice/myproject. Create a new "bare" @@ -143,12 +144,17 @@ work, you must not modify the imported branches; instead, create new branches for your own changes, and merge in the imported branches as necessary. +If you want a shared repository, you will need to make a bare clone +of the imported directory, as described above. Then treat the imported +directory as another development clone for purposes of merging +incremental imports. + Advanced Shared Repository Management ------------------------------------- Git allows you to specify scripts called "hooks" to be run at certain points. You can use these, for example, to send all commits to the shared -repository to a mailing list. See linkgit:githooks[5][Hooks used by git]. +repository to a mailing list. See linkgit:githooks[5]. You can enforce finer grained permissions using update hooks. See link:howto/update-hook-example.txt[Controlling access to branches using |