{
    "content": [
        {
            "type": "text",
            "text": "# gitcvs-migration (info)\n\n## NAME\n\ngitcvs-migration - Git for CVS users\n\n## SYNOPSIS\n\ngit cvsimport *\n\n## DESCRIPTION\n\nGit differs from CVS in that every working tree contains a repository\nwith a full copy of the project history, and no repository is\ninherently more important than any other. However, you can emulate the\nCVS model by designating a single shared repository which people can\nsynchronize with; this document explains how to do that.\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **DEVELOPING AGAINST A SHARED REPOSITORY**\n- **SETTING UP A SHARED REPOSITORY**\n- **IMPORTING A CVS ARCHIVE**\n- **ADVANCED SHARED REPOSITORY MANAGEMENT**\n- **PROVIDING CVS ACCESS TO A GIT REPOSITORY**\n- **ALTERNATIVE DEVELOPMENT MODELS**\n- **SEE ALSO**\n- **GIT**\n- **NOTES**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "gitcvs-migration",
        "section": "",
        "mode": "info",
        "summary": "gitcvs-migration - Git for CVS users",
        "synopsis": "git cvsimport *",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [
            {
                "name": "gittutorial",
                "section": "7",
                "url": "https://www.chedong.com/phpMan.php/man/gittutorial/7/json"
            },
            {
                "name": "gittutorial-2",
                "section": "7",
                "url": "https://www.chedong.com/phpMan.php/man/gittutorial-2/7/json"
            },
            {
                "name": "gitcore-tutorial",
                "section": "7",
                "url": "https://www.chedong.com/phpMan.php/man/gitcore-tutorial/7/json"
            },
            {
                "name": "gitglossary",
                "section": "7",
                "url": "https://www.chedong.com/phpMan.php/man/gitglossary/7/json"
            },
            {
                "name": "giteveryday",
                "section": "7",
                "url": "https://www.chedong.com/phpMan.php/man/giteveryday/7/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 9,
                "subsections": []
            },
            {
                "name": "DEVELOPING AGAINST A SHARED REPOSITORY",
                "lines": 42,
                "subsections": []
            },
            {
                "name": "SETTING UP A SHARED REPOSITORY",
                "lines": 29,
                "subsections": []
            },
            {
                "name": "IMPORTING A CVS ARCHIVE",
                "lines": 36,
                "subsections": []
            },
            {
                "name": "ADVANCED SHARED REPOSITORY MANAGEMENT",
                "lines": 7,
                "subsections": []
            },
            {
                "name": "PROVIDING CVS ACCESS TO A GIT REPOSITORY",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "ALTERNATIVE DEVELOPMENT MODELS",
                "lines": 18,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "GIT",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "NOTES",
                "lines": 7,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "gitcvs-migration - Git for CVS users\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "git cvsimport *\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "Git differs from CVS in that every working tree contains a repository\nwith a full copy of the project history, and no repository is\ninherently more important than any other. However, you can emulate the\nCVS model by designating a single shared repository which people can\nsynchronize with; this document explains how to do that.\n\nSome basic familiarity with Git is required. Having gone through\ngittutorial(7) and gitglossary(7) should be sufficient.\n",
                "subsections": []
            },
            "DEVELOPING AGAINST A SHARED REPOSITORY": {
                "content": "Suppose a shared repository is set up in /pub/repo.git on the host\nfoo.com. Then as an individual committer you can clone the shared\nrepository over ssh with:\n\n$ git clone foo.com:/pub/repo.git/ my-project\n$ cd my-project\n\nand hack away. The equivalent of cvs update is\n\n$ git pull origin\n\nwhich merges in any work that others might have done since the clone\noperation. If there are uncommitted changes in your working tree,\ncommit them first before running git pull.\n\nNote\nThe pull command knows where to get updates from because of certain\nconfiguration variables that were set by the first git clone\ncommand; see git config -l and the git-config(1) man page for\ndetails.\n\nYou can update the shared repository with your changes by first\ncommitting your changes, and then using the git push command:\n\n$ git push origin master\n\nto \"push\" those commits to the shared repository. If someone else has\nupdated the repository more recently, git push, like cvs commit, will\ncomplain, in which case you must pull any changes before attempting the\npush again.\n\nIn the git push command above we specify the name of the remote branch\nto update (master). If we leave that out, git push tries to update any\nbranches in the remote repository that have the same name as a branch\nin the local repository. So the last push can be done with either of:\n\n$ git push origin\n$ git push foo.com:/pub/project.git/\n\nas long as the shared repository does not have any branches other than\nmaster.\n",
                "subsections": []
            },
            "SETTING UP A SHARED REPOSITORY": {
                "content": "We assume you have already created a Git repository for your project,\npossibly created from scratch or from a tarball (see gittutorial(7)),\nor imported from an already existing CVS repository (see the next\nsection).\n\nAssume your existing repo is at /home/alice/myproject. Create a new\n\"bare\" repository (a repository without a working tree) and fetch your\nproject into it:\n\n$ mkdir /pub/my-repo.git\n$ cd /pub/my-repo.git\n$ git --bare init --shared\n$ git --bare fetch /home/alice/myproject master:master\n\nNext, give every team member read/write access to this repository. One\neasy way to do this is to give all the team members ssh access to the\nmachine where the repository is hosted. If you don't want to give them\na full shell on the machine, there is a restricted shell which only\nallows users to do Git pushes and pulls; see git-shell(1).\n\nPut all the committers in the same group, and make the repository\nwritable by that group:\n\n$ chgrp -R $group /pub/my-repo.git\n\nMake sure committers have a umask of at most 027, so that the\ndirectories they create are writable and searchable by other group\nmembers.\n",
                "subsections": []
            },
            "IMPORTING A CVS ARCHIVE": {
                "content": "Note\nThese instructions use the git-cvsimport script which ships with\ngit, but other importers may provide better results. See the note\nin git-cvsimport(1) for other options.\n\nFirst, install version 2.1 or higher of cvsps from\nhttps://github.com/andreyvit/cvsps and make sure it is in your path.\nThen cd to a checked out CVS working directory of the project you are\ninterested in and run git-cvsimport(1):\n\n$ git cvsimport -C <destination> <module>\n\nThis puts a Git archive of the named CVS module in the directory\n<destination>, which will be created if necessary.\n\nThe import checks out from CVS every revision of every file. Reportedly\ncvsimport can average some twenty revisions per second, so for a\nmedium-sized project this should not take more than a couple of\nminutes. Larger projects or remote repositories may take longer.\n\nThe main trunk is stored in the Git branch named origin, and additional\nCVS branches are stored in Git branches with the same names. The most\nrecent version of the main trunk is also left checked out on the master\nbranch, so you can start adding your own changes right away.\n\nThe import is incremental, so if you call it again next month it will\nfetch any CVS updates that have been made in the meantime. For this to\nwork, you must not modify the imported branches; instead, create new\nbranches for your own changes, and merge in the imported branches as\nnecessary.\n\nIf you want a shared repository, you will need to make a bare clone of\nthe imported directory, as described above. Then treat the imported\ndirectory as another development clone for purposes of merging\nincremental imports.\n",
                "subsections": []
            },
            "ADVANCED SHARED REPOSITORY MANAGEMENT": {
                "content": "Git allows you to specify scripts called \"hooks\" to be run at certain\npoints. You can use these, for example, to send all commits to the\nshared repository to a mailing list. See githooks(5).\n\nYou can enforce finer grained permissions using update hooks. See\nControlling access to branches using update hooks[1].\n",
                "subsections": []
            },
            "PROVIDING CVS ACCESS TO A GIT REPOSITORY": {
                "content": "It is also possible to provide true CVS access to a Git repository, so\nthat developers can still use CVS; see git-cvsserver(1) for details.\n",
                "subsections": []
            },
            "ALTERNATIVE DEVELOPMENT MODELS": {
                "content": "CVS users are accustomed to giving a group of developers commit access\nto a common repository. As we've seen, this is also possible with Git.\nHowever, the distributed nature of Git allows other development models,\nand you may want to first consider whether one of them might be a\nbetter fit for your project.\n\nFor example, you can choose a single person to maintain the project's\nprimary public repository. Other developers then clone this repository\nand each work in their own clone. When they have a series of changes\nthat they're happy with, they ask the maintainer to pull from the\nbranch containing the changes. The maintainer reviews their changes and\npulls them into the primary repository, which other developers pull\nfrom as necessary to stay coordinated. The Linux kernel and other\nprojects use variants of this model.\n\nWith a small group, developers may just pull changes from each other's\nrepositories without the need for a central maintainer.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "gittutorial(7), gittutorial-2(7), gitcore-tutorial(7), gitglossary(7),\ngiteveryday(7), The Git User's Manual[2]\n",
                "subsections": []
            },
            "GIT": {
                "content": "Part of the git(1) suite\n",
                "subsections": []
            },
            "NOTES": {
                "content": "1. Controlling access to branches using update hooks\nfile:///usr/share/doc/git/html/howto/update-hook-example.html\n\n2. The Git User's Manual\nfile:///usr/share/doc/git/html/user-manual.html\n\nGit 2.34.1                        02/26/2026               GITCVS-MIGRATION(7)",
                "subsections": []
            }
        }
    }
}