Differences between revisions 5 and 6
Revision 5 as of 2008-01-15 15:49:28
Size: 2425
Editor: abuehl
Comment: cat
Revision 6 as of 2008-01-15 22:57:43
Size: 2441
Editor: abuehl
Comment: #language ko
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
#language ko

입문서 - 저장소를 복사합니다

["Mercurial"]을 설치하기 위해 KoreanTutorialInstall는 벌써 마치셨나요? 좋습니다!

["Mercurial"]로 하는 모든 작업은 [:Repository:저장소]안에서 이루어집니다. [:Repository:저장소]는 우리가 이력을 기록하여 두고 싶다고 생각하는 모든 파일을 포함한 디렉토리로서, 이와 같은 소스 파일의 완전한 이력을 집어 넣습니다.

["Mercurial"]을 쓰기 시작하는 가장 간단한 방법은, 이미 파일 몇개와 이력이 들어 있는 [:Repository:저장소]를 사용하는 것입니다.

그때 clone 명령을 씁니다. 이 명령은 [:Repository:저장소]를 [:Clone:복제]합니다;이것은 다른 [:Repository:저장소]의 완전한 복사물을 만들어, 우리가 우리 맘대로 할 수 있는 로컬 개인 저장소로 작업할 수 있게 해줍니다.

selenic.com에 올려져 있는 "hello, world" 저장소를 복제해 봅시다.

$ hg clone http://www.selenic.com/repo/hello my-hello

다 잘 되었다면, clone 명령은 아래와 같이 표시합니다:

requesting all changes
adding changesets
adding manifests
adding file changes
added 2 changesets with 2 changes to 2 files

이로써 현재 디렉토리에 my-hello라는 이름의 디렉토리가 생긴 것을 확인할 수 있습니다.

$ ls
my-hello

my-hello 디렉토리 안에는, 몇개의 파일이 들어 있음을 볼 수 있습니다.

$ ls my-hello
Makefile  hello.c

이 파일들은 우리가 방금 [:Clone:복제]한 [:Repository:저장소]에 있는 파일의 정확한 복사판입니다.

주의:["Mercurial"]에서는, 각 [:Repository:저장소]는 자기완결적인 상태입니다. [:Repository:저장소]를 [:Clone:복제]한 경우에, 새로운 [:Repository:저장소]는 기존의 저장소를 [:Clone:복제]한 시점에서의 정확한 복사판이 됩니다만, 그 뒤로 어느 한 쪽의 저장소에 변경이 가해지는 경우, 그 변경은 ["Pull"]이나 ["Push"]로 명시적인 전송을 하지 않는 한, 더 이상 다른 쪽의 저장소에는 나타나지 않습니다.

이것으로, 새롭게 만들어진 [:Repository:저장소]의 이력을 알아볼 수 있게 되었습니다. KoreanTutorialHistory로 이어집니다.


CategoryKorean

KoreanTutorialClone (last edited 2009-05-19 19:31:04 by localhost)