문제
Github 프로젝트의 다른 지점을 추적하려고합니다. 프로젝트는 restful_authentication입니다.
http://github.com/technoweenie/restful-authentication
그러나 내가 실제로 복제하고 싶은 것은 모듈 식 브랜치입니다.
http://github.com/technoweenie/restful-authentication/tree/modular
이 안내서를 찾았습니다.
http://github.com/guides/showing-and-tracking-remote-branches
다음과 같은 몇 가지 명령을 시도했습니다.
git checkout --track -b lmod http://github.com/technoweenie/restful-authentication/tree/modular
그리고
git checkout --track -b lmod git://github.com/technoweenie/restful-authentication.git/modular
그러나 다음 오류가 발생합니다.
fatal: git checkout: updating paths is incompatible with switching branches
이 작업을 수행하는 올바른 방법에 대한 생각이 있습니까?
감사
해결책
분기를 복제 할 수는 없으며 전체 저장소를 복제해야합니다.
git clone git://github.com/technoweenie/restful-authentication.git
그런 다음 로컬 저장소에서 추적 브랜치를 사용할 수 있습니다.
cd restful-authentication
git checkout --track -b lmod origin/modular
클로닝 후 GIT는 원격 저장소의 이름 "원점"이라는 "원격"을 설정했으며 "Origin/Modular"는 "원점"원격의 "모듈 식"분기를 식별합니다.
제휴하지 않습니다 StackOverflow