Before the rise of
git, I used
rcs as my version control system.
Because I want to standardize on
git, I am slowly converting old repositories.
In this article I’ll be converting my old
perl scripts in
Create a fast-import stream
From the existing repo, we create a fast-import stream using cvs-fast-export.
cd ~/src/perl find . | cvs-fast-export -A ~/authormap > ../perl.fi
Create new repo
Next, we create a new directory and initialize it as a git repo.
cd ~/src mkdir new-perl cd new-perl git init .
Performing the import
Now we import the RCS data.
git fast-import <../perl.fi git checkout
Commit changes that were not committed to RCS
There might be changes in the directory that were not recorded in RCS. In this case we will import them all in one go, just to capture the state of these files.
cp ../perl/*.pl . git add . git commit -m "Record uncommitted changes."
For a time, we want to keep the old data around just in case we missed something. However, the new git repo is now the canonical source.
cd ~/src mv perl old-perl mv new-perl perl
For comments, please send me an e-mail.
- Removing big files from git history
- Making a subset of a git repository
- Keyword expansion with git
- Initializing a new git repo for a project