LoginSignup
5
6

More than 3 years have passed since last update.

cvsリポジトリをgitに変換

Last updated at Posted at 2014-03-12

準備

centos7の場合
yum install -y git-cvs cvsps
ubuntuの場合
apt install -y git-cvs cvsps

CVSROOTの環境変数を確認

# 手元で動かしたい場合はローカルに
# /var/cvs-rep/ の /CVSROOT/ と、該当のディレクトリを持ってきて動かせば良い。
export CVSROOT=/home/user/cvs-rep/

変換

myprojectリポジトリをmyproject.gitに変換
git cvsimport -v -C myproject.git myproject
cd myproject.git
念のため差分がないか確認(cvs側でcommitし忘れとか)
diff -ru myproject myproject.git | egrep -v ^Only.*"CVS|.git"$

タグ付け

あとで分かるようにタグ付け
git tag convert-from-cvs
タグつけるの忘れたのに気づいた場合、ハッシュを指定すれば良い。
git tag convert-from-cvs 78ee21b2a92a111703761aeb
5
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
6