Annotation of wikisrc/tutorials/using_git_to_track_netbsd_cvs_source_repository.mdwn, revision 1.2

1.2     ! schmonz     1: **Contents**
        !             2: 
        !             3: [[!toc levels=3]]
        !             4: 
        !             5: #  Introduction
        !             6: 
        !             7: The purpose of this document is to guide you on how to track NetBSD CVS source repository with [git][12]. We are going to make a "bulk import" and by this is meant that not all the CVS checkins with comments are going to be imported. If we wanted so, we would use the [git-cvsimport(1)][13] tool. 
        !             8: 
        !             9:    [12]: http://git.or.cz/ (http://git.or.cz/)
        !            10:    [13]: http://www.kernel.org/pub/software/scm/git/docs/git-cvsimport.html (http://www.kernel.org/pub/software/scm/git/docs/git-cvsimport.html)
        !            11: 
        !            12: #  Download current source
        !            13: 
        !            14: To begin with, we must have a current CVS snapshot of the NetBSD source tree. I assume you already have one in `/usr/src-git`. If not, please consult [this article][14] in the official NetBSD documentation page. 
        !            15: 
        !            16:    [14]: http://www.netbsd.org/docs/current/#downloading (http://www.netbsd.org/docs/current/#downloading)
        !            17: 
        !            18: #  Symbiosis
        !            19: 
        !            20: Since both CVS and Git are going to live together inside the same directory, it is essential to hide each one from the other. That is because we don't want CVS to track git files or vice versa. For this purpose we need two files inside the root directory of our source tree. 
        !            21: 
        !            22: ##  .cvsignore
        !            23: 
        !            24: Create a file named `.cvsignore` inside `/usr/src-git` and put the following line in it: 
        !            25:     
        !            26:     .git/
        !            27:     .gitignore
        !            28:     
        !            29: 
        !            30: ##  .gitignore
        !            31: 
        !            32: Create a file named `.gitignore` inside `/usr/src-git` and put the following lines in it: 
        !            33:     
        !            34:     CVS/
        !            35:     .cvsignore
        !            36:     
        !            37: 
        !            38: #  Initial import of NetBSD CVS source repository
        !            39:     
        !            40:     # cd /usr/src-git
        !            41:     # git init
        !            42:     Initialized empty Git repository in /usr/src-git/.git/
        !            43:     # git add .
        !            44:     # git commit -m "Initial import of the NetBSD CVS source repository"
        !            45:     
        !            46: 
        !            47: #  Keeping the git repository uptodate with CVS
        !            48: 
        !            49: From time to time, we update the main git repository with the latest changes from CVS. 
        !            50:     
        !            51:     # cvs update -dPA
        !            52:     # git add .
        !            53:     # git commit -a -m "Update to latest CVS snapshot"
        !            54:     
        !            55: 
        !            56: #  Done
        !            57: 
        !            58: You can examine the log: 
        !            59:     
        !            60:     # cd /usr/src-git
        !            61:     # git log
        !            62:     commit 9fe7a0469a8ef58fd5b484c0931808a2d23f559e
        !            63:     Author: Charlie <root@netbsd.(none)>
        !            64:     Date:   Mon Nov 24 01:17:31 2008 +0200
        !            65:     
        !            66:         Update to latest CVS snapshot
        !            67:     
        !            68:     commit 78189d3fa331073021eaea88d1f51f3487d756b7
        !            69:     Author: Charlie <root@netbsd.(none)>
        !            70:     Date:   Mon Nov 24 00:59:47 2008 +0200
        !            71:     
        !            72:         Initial import of the NetBSD CVS source repository
        !            73:     #
        !            74:     
        !            75: 
        !            76: Or create a crazy branch to work on, offline, without being embarassed if it ends up as a dead end. 
        !            77:     
        !            78:     # cd /usr/src-git
        !            79:     # git branch
        !            80:     * master
        !            81:     # git checkout -b crazy-branch
        !            82:     Switched to a new branch "crazy-branch"
        !            83:     # git branch -a
        !            84:     * crazy-branch
        !            85:       master
        !            86:     #
        !            87:     
        !            88: 
        !            89: #  References
        !            90: 
        !            91: [Using git to track firefox cvs][15]
        !            92: 
        !            93:    [15]: http://www.bluishcoder.co.nz/2007/06/using-git-to-track-firefox-cvs.html (http://www.bluishcoder.co.nz/2007/06/using-git-to-track-firefox-cvs.html)
        !            94: 

CVSweb for NetBSD wikisrc <wikimaster@NetBSD.org> software: FreeBSD-CVSweb