성태의 닷넷 이야기
홈 주인
모아 놓은 자료
프로그래밍
질문/답변
사용자 관리
사용자
메뉴
아티클
외부 아티클
유용한 코드
온라인 기능
MathJax 입력기
최근 덧글
[정성태] Roll A Lisp In C - Reading ; https...
[정성태] Java - How to use the Foreign Funct...
[정성태] 제가 큰 실수를 했군요. ^^; Delegate를 통한 Bein...
[정성태] Working with Rust Libraries from C#...
[정성태] Detecting blocking calls using asyn...
[정성태] 아쉽게도, 커뮤니티는 아니고 개인 블로그입니다. ^^
[정성태] 질문이 잘 이해가 안 됩니다. 우선, 해당 소스코드에서 ILis...
[양승조
] var대신 dinamic으로 선언해서 해결은 했습니다. 맞는 해...
[양승조
] 또 막혔습니다. ㅠㅠ var list = props[i].Ge...
[양승조
] 아. 감사합니다. 어제는 안됐던것 같은데....정신을 차려야겠네...
글쓰기
제목
이름
암호
전자우편
HTML
홈페이지
유형
제니퍼 .NET
닷넷
COM 개체 관련
스크립트
VC++
VS.NET IDE
Windows
Team Foundation Server
디버깅 기술
오류 유형
개발 환경 구성
웹
기타
Linux
Java
DDK
Math
Phone
Graphics
사물인터넷
부모글 보이기/감추기
내용
<div style='display: inline'> <h1 style='font-family: Malgun Gothic, Consolas; font-size: 20pt; color: #006699; text-align: center; font-weight: bold'>TFS에서 gitlab/github등의 git 서버로 마이그레이션하는 방법</h1> <p> Version Control 시스템으로 TFS를 사용하다가 git으로, 가령 github, gitlab 또는 직접 설치한 git 서버로 마이그레이션하고 싶을 수 있습니다. 아래는 그런 경우를 위한 문서입니다.<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > Migrating from TFS ; <a target='tab' href='https://docs.gitlab.com/ee/user/project/import/tfs.html'>https://docs.gitlab.com/ee/user/project/import/tfs.html</a> git-tfs/git-tfs ; <a target='tab' href='https://github.com/git-tfs/git-tfs'>https://github.com/git-tfs/git-tfs</a> Migrate toward external git repository ; <a target='tab' href='https://github.com/git-tfs/git-tfs/blob/master/doc/usecases/migrate_tfs_to_git.md'>https://github.com/git-tfs/git-tfs/blob/master/doc/usecases/migrate_tfs_to_git.md</a> </pre> <br /> 생각보다 매우 쉽게 마이그레이션할 수 있습니다. 우선, 모든 작업을 한방에 해결해주는 git-tfs 도구를 다운로드하고,<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > git-tfs v0.30 ; <a target='tab' href='https://github.com/git-tfs/git-tfs/releases'>https://github.com/git-tfs/git-tfs/releases</a> ; <a target='tab' href='https://github.com/git-tfs/git-tfs/releases/download/v0.30/GitTfs-0.30.0.zip'>https://github.com/git-tfs/git-tfs/releases/download/v0.30/GitTfs-0.30.0.zip</a> </pre> <br /> 압축을 푼 다음(이 글에서는 "D:\Tools\gittfs"에 풀었다고 가정), "git-tfs.exe"를 찾을 수 있도록 환경 변수 PATH에 등록해 줍니다.<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > set PATH=%PATH%;D:\Tools\gittfs </pre> <br /> 잘 실행이 되는지 명령행에서 간단하게 실행해 보고,<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > c:\temp> <span style='color: blue; font-weight: bold'>git tfs help</span> </pre> <br /> 이제 TFS 서버에 등록된 프로젝트를 다음의 명령어로 그동안의 check-in 기록을 모두 포함하면서 git 포맷으로 내려받을 수 있습니다.<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > git tfs clone http://[TFS서버]:[포트]/tfs/[Collection이름] $/[프로젝트_경로] [로컬_폴더] --branches=auto 예) c:\temp> git tfs clone http://localhost:8080/tfs/DefaultCollection $/MyTest/Sources .\clone --branches=auto </pre> <br /> ("$/[프로젝트]" 경로는 "Source Control Explorer"에 들어가면 "Source Location"으로 나오는 그 경로입니다.)<br /> <br /> 위와 같이 명령을 내리면 TFS 서버의 <span class="tex2jax_ignore">$</span>/MyTest/Sources 경로 이하의 모든 이력과 소스 코드를 c:\temp\clone 폴더에 로컬 git repo로 구성해 줍니다. 엄밀히 말해서 마이그레이션 작업은 사실 이게 끝입니다. 이후는 로컬에 구성된 git repo를 git의 방식대로 원격에 넣거나 로컬 그대로 사용하시면 됩니다. <br /> <br /> <hr style='width: 50%' /><br /> <br /> 당연하겠지만, tfs로부터 clone하긴 했어도 기본적으로는 remote 설정이 비어 있습니다.<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > c:\temp\clone> <span style='color: blue; font-weight: bold'>git remote</span> c:\temp\clone> </pre> <br /> 따라서 gitlab(또는 github) 프로젝트 측 repo를 등록하고,<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > c:\temp\clone> git remote add origin https://github.com/stjeong/Sample.git </pre> <br /> 모든 내용을 업로드하면 됩니다.<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > c:\temp\clone> git push -u origin --all c:\temp\clone> git push -u origin --tags </pre> <br /> <hr style='width: 50%' /><br /> <br /> git tfs clone 시 다음과 같은 오류가 발생한다면?<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > c:\temp> git tfs clone http://localhost:8080/tfs/DefaultCollection $/MyTest/Sources .\clone --branches=auto Initialized empty Git repository in D:/temp/mig/clone/clone/.git/ Git-tfs requires that the user data in git config should be set. Please configure them before using git-tfs Actual config: * user name: <not set> * user email: <not set> For help on how to set user git config, see https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup All the logs could be found in the log file: C:\Users\SeongTae Jeong\AppData\Local\git-tfs\git-tfs_log.txt </pre> <br /> 오류 메시지 그대로 user.name, user.email을 등록한 후 사용하면 됩니다.<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > c:\temp> git config --list core.symlinks=false core.autocrlf=true core.fscache=true color.diff=auto color.status=auto color.branch=auto color.interactive=true help.format=html diff.astextplain.textconv=astextplain rebase.autosquash=true http.sslcainfo=C:/Program Files/Git/mingw64/ssl/certs/ca-bundle.crt http.sslbackend=openssl diff.astextplain.textconv=astextplain credential.helper=manager user.name= user.email= filter.lfs.clean=git-lfs clean -- %f filter.lfs.smudge=git-lfs smudge -- %f filter.lfs.process=git-lfs filter-process filter.lfs.required=true init.defaultbranch=master c:\temp> git config --global --list user.name= user.email= filter.lfs.clean=git-lfs clean -- %f filter.lfs.smudge=git-lfs smudge -- %f filter.lfs.process=git-lfs filter-process filter.lfs.required=true init.defaultbranch=master c:\temp> git config --global user.name "testusr" c:\temp> git config --global user.email "tusr@test.com" /* git config --global --unset user.name */ </pre> <br /> 위와 같은 경우 "--global로 했기 때문에 "%USERPROFILE%\.gitconfig" 파일에 설정이 저장됩니다.<br /> <br /> <hr style='width: 50%' /><br /> <br /> "git push" 과정에서 다음과 같은 오류가 발생한다면?<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > c:\temp\clone> git push -u origin --all git: 'remote-https' is not a git command. See 'git --help'. </pre> <br /> "git-remote-https.exe" 파일이 PATH에 없어서 그런 것입니다. Visual Studio 2019 사용자의 경우 별도의 프로그램 설치 없이 그냥 다음과 같이 경로를 등록해 주면 됩니다.<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > set PATH=%PATH%;C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Git\mingw32\bin </pre> </p><br /> <br /><hr /><span style='color: Maroon'>[이 글에 대해서 여러분들과 의견을 공유하고 싶습니다. 틀리거나 미흡한 부분 또는 의문 사항이 있으시면 언제든 댓글 남겨주십시오.]</span> </div>
첨부파일
스팸 방지용 인증 번호
1862
(왼쪽의 숫자를 입력해야 합니다.)