LoginSignup
1
0

SVNプロジェクトのGit移行

Last updated at Posted at 2024-03-03

はじめに

SVNプロジェクトをGitに移行したときのメモです。

手順1:Git for Windows のバージョン変更

バージョン「2.33.0.0.2」の では git svn コマンドを実行するとエラーが発生。
エラーが発生しなかった「2.28.0-rc2」にダウングレードする必要がありました。
https://github.com/git-for-windows/git/releases/tag/v2.28.0-rc2.windows.1

手順2:GitLabにプロジェクト作成

手順3:GitLabへの移行

mkdir temp
cd temp
git svn init --no-metadata https://XXX.XXX.XXX.XXX:XXXX/svn/server/project
git svn fetch
git clone . ../project
cd ../project

## オリジンの確認:ローカルになっている
git remote -v

## オリジンの変更
git remote set-url origin http://gitlab.xxxxx.co.jp/system/project.git

## オリジンの変更確認
git remote -v
1
0
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
1
0