랭귀지/Git
Git : clone 명령어 정리
유키공
2018. 8. 3. 12:31
clone
저장소 복제
현재 경로에 로컬 깃 저장소가 될 디렉토리를 만들고 리모트 저장소의 데이터를 모두 받아온다. 디렉토리명을 따로 명시하지 않으면 리모트 저장소의 이름과 동일하게 생성됩니다.
git clone ~/Documents/workspace/ex/cal/src
git clone file://c:/users/noritersand/noriterGit/localServer localGitRepo
git clone https://noritersand@dev.naver.com/git/lernforscm.git naverGitRepo
git clone git://github.com/schacon/grit.git gitHubRepo
리모트 저장소를 복제하면서 bare repository로 설정
git clone --bare 저장소주소 [디렉토리]
복제 시 데이터 제한하기
git clone --depth 200 ~/Documents/work/ # 마지막 200개의 커밋만 복제합니다.