Latest web development tutorials

힘내보기 제출 역사

힘내보기 제출 역사

사용 힘내 업데이트의 수를 제출 또는 검토 역사에서 제출하는 항목을 복제 한 후, 우리는 자식 로그 명령을 사용할 수 있습니다.

자식 로그 명령과 이전 섹션의 작동을 위해 다음과 같이 제출 된 기록의 역사를 나열합니다 :

$ git log
commit 88afe0e02adcdfea6844bb627de97da21eb10af1
Merge: 14b4dca d7e7346
Author: w3cschool <[email protected]>
Date:   Sun Mar 1 15:03:42 2015 +0800

    Merge branch 'change_site'
    
    Conflicts:
        test.txt

commit 14b4dcadbdc847207651d5a9fae0d315057f346e
Author: w3cschool <[email protected]>
Date:   Sun Mar 1 14:53:15 2015 +0800

    新增加一行

commit d7e734640da06055e107eaf29cf350b3f1de1c2c
Author: w3cschool <[email protected]>
Date:   Sun Mar 1 14:48:57 2015 +0800

    changed the site

commit 556f0a0637978097b82287ac665a717623b21f3f
Author: w3cschool <[email protected]>
Date:   Sun Mar 1 14:40:34 2015 +0800

    removed test2.txt

우리는 컴팩트 한 버전의 역사를 볼 수 --oneline 옵션을 사용할 수 있습니다.

$ git log --oneline
88afe0e Merge branch 'change_site'
14b4dca 新增加一行
d7e7346 changed the site
556f0a0 removed test2.txt
2e082b7 add test2.txt
048598f add test.txt
85fc7e7 test comment from w3cschool.cc

이이 프로젝트의 개발의 역사라고 우리에게 이야기한다.

우리는 또한 때 분기 통합 발생한의 역사를 볼 수 옵션을 --graph 사용할 수 있습니다. 여기에 같은 명령은 토폴로지 옵션을 열고 있습니다 :

$ git log --oneline --graph
*   88afe0e Merge branch 'change_site'
|\  
| * d7e7346 changed the site
* | 14b4dca 新增加一行
|/  
* 556f0a0 removed test2.txt
* 2e082b7 add test2.txt
* 048598f add test.txt
* 85fc7e7 test comment from w3cschool.cc

이제 우리는 더 명확하게 볼 때 작업 분기를 이해하고 병합 할 때 할 수 있습니다.

또한 모든 역 '--reverse'매개 변수를 표시하는 로그를 사용할 수 있습니다.

$ git log --reverse --oneline
85fc7e7 test comment from w3cschool.cc
048598f add test.txt
2e082b7 add test2.txt
556f0a0 removed test2.txt
d7e7346 changed the site
14b4dca 新增加一行
88afe0e Merge branch 'change_site'

당신이 명령을 사용하여 제출할 수 지정된 사용자 로그를 찾으려면 : 예를 들어, 자식 로그 --author을의 제출 우리가 일부 망할 놈의 소스 코드 리누스를 찾고 있습니다 가정 해 봅시다 :

$ git log --author=Linus --oneline -5
81b50f3 Move 'builtin-*' into a 'builtin/' subdirectory
3bb7256 make "index-pack" a built-in
377d027 make "git pack-redundant" a built-in
b532581 make "git unpack-file" a built-in
112dd51 make "mktag" a built-in

이후 및 --before,하지만 당신은 또한 --until 및 --after 사용할 수 있습니다 : - 당신이 날짜를 지정하려는 경우, 당신은 몇 가지 옵션을 수행 할 수 있습니다.

내가 3 주 전에 망할 놈의 프로젝트를보고 싶은 모든 년 4 월 (18) 이후에 제출, 나는이 작업을 수행 할 수 있습니다 예를 들어, (나는 또한 사용 커밋 병합 숨길 수있는 옵션을 --no을-병합) :

$ git log --oneline --before={3.weeks.ago} --after={2010-04-18} --no-merges
5469e2d Git 1.7.1-rc2
d43427d Documentation/remote-helpers: Fix typos and improve language
272a36b Fixup: Second argument may be any arbitrary string
b6c8d2d Documentation/remote-helpers: Add invocation section
5ce4f4e Documentation/urls: Rewrite to accomodate transport::address
00b84e9 Documentation/remote-helpers: Rewrite description
03aa87e Documentation: Describe other situations where -z affects git diff
77bc694 rebase-interactive: silence warning when no commits rewritten
636db2c t3301: add tests to use --format="%N"

보기에 더 많은 자식 로그 명령을 http://git-scm.com/docs/git-log