GitLab
SVN 저장소를 Git으로 옮기는 방법
모래반지빵냐빵냐
2017. 11. 2. 15:39
기존 Subversion으로 관리하던 소스코드를 Git으로 관리하는 것이 대세이다. 이 게시물은 svn으로 관리하던 소스코드를 Git으로 옮기는 방법을 정리 한다.
사전 준비:
- Subversion client 설치
- Git 설치
- SVN 사용자 목록 파일 생성 (예: authors.txt)
Terry Hwang<terry.hwang@curvc.com>
.
.
.
Step 1) SVN 저장소 클론
SVN repository가 /trunk, /branches, /tags 로만 구성되었을 경우:
1 | git svn clone --stdlayout --authors-file=authors.txt <svn-repo>/<project> <git-repo-name> |
예)
1 | git svn clone --stdlayout --authors-file=authors.txt https://svn.atlassian.com/Confluence ConfluenceAsGit |
SVN repository가 특별한 branch로 구성되었을 경우:
1 | git svn clone --trunk=/trunk --branches=/branches --branches=/bugfixes --authors-file=authors.txt <svn-repo>/<project> <git-repo-name> |
예)
1 | git svn clone --trunk=/trunk --branches=/branches --branches=/bugfixes --authors-file=authors.txt https://svn.atlassian.com/Confluence ConfluenceAsGit |
참고 사이트 = https://www.atlassian.com/git/tutorials/migrating-convert