준비

아래와 같은 프로그램들이 설치 되어 있어야 합니다.

  • svn: svn소스
  • git: 깃
  • git-svn: 마이그레이션 도구

    MAC에서

$ brew install git git-svn svn

git에 remote repo를 생성해 놓습니다.

SVN 에서 사용자 가져오기

$ svn log -q
r38 | hello | 2016-04-29 15:44:52 +0900 (금, 29  4 2016)
------------------------------------------------------------------------
r37 | hello | 2016-04-29 15:00:44 +0900 (금, 29  4 2016)
------------------------------------------------------------------------

users.txt 사용자 매핑파일 생성하기

sample1 = sample1 <sample1@exmaple.com>
sample2 = sample2 <sample2@exmaple.com>
sample3 = sample3 <sample3@exmaple.com>
VisualSVN Server = VisualSVN Server <VisualSVN_Server@exmaple.com>

|> [!caution] 사소한 계정들 모두 정보가 있어야 합니다. 하나라도 빠지면 안됩니다.

Author: VisualSVN Server not defined in users.txt file 와 같은 에러가 발생합니다.

Migration

$ git-svn clone --authors-file users.txt --no-metadata --authors-file 'users.txt' https://123.223.12.22/svn/example/trunk
...
...
        M       src/main/java/com/exmaple/sample/see/weapojfawService.java
        M       src/main/java/com/exmaple/sample/service/real/HellowService.java
        M       src/main/java/com/exmaple/sample/util/excel/Excel.java
        M       src/main/java/com/exmaple/sample/util/excel/Excel2.java
        M       src/main/webapp/WEB-INF/views/fi/rt/netAssetsMonthly.html
r3029 = f317a56a69906edafdf641e2b9cc4388defb7f07587 (refs/remotes/git-svn)

위와 같은 식으로 된다

remote push

$ git remote add origin http://gitlab.com:port/remote_git.git
$ git push -u origin master
반응형

+ Recent posts