Git 제출 내 역 보기

3195 단어 Git
Git 을 사용 하여 몇 가지 업 데 이 트 를 제출 한 후에 어떤 항목 을 복 제 했 습 니 다.역 사 를 돌 이 켜 보면 git log 명령 으로 볼 수 있 습 니 다.
$ git log
commit 88afe0e02adcdfea6844bb627de97da21eb10af1
Merge: 14b4dca d7e7346
Author: runoob 
Date:   Sun Mar 1 15:03:42 2015 +0800

    Merge branch 'change_site'
    
    Conflicts:
        test.txt

commit 14b4dcadbdc847207651d5a9fae0d315057f346e
Author: runoob 
Date:   Sun Mar 1 14:53:15 2015 +0800

         

commit d7e734640da06055e107eaf29cf350b3f1de1c2c
Author: runoob 
Date:   Sun Mar 1 14:48:57 2015 +0800

    changed the site

commit 556f0a0637978097b82287ac665a717623b21f3f
Author: runoob 
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 runoob.com

 
  우 리 는 또한-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 runoob.com

   이제 우 리 는 언제 업무 분 수 를 하고 언제 합병 하 는 지 더욱 분명하게 볼 수 있다.
   모든 로 그 를 역방향 으로 표시 할 수도 있 습 니 다.
$ git log --reverse --oneline
85fc7e7 test comment from runoob.com
048598f add test.txt
2e082b7 add test2.txt
556f0a0 removed test2.txt
d7e7346 changed the site
14b4dca      
88afe0e Merge branch 'change_site'

 
   지정 한 사용자 의 제출 로그 만 찾 으 려 면 명령 을 사용 할 수 있 습 니 다:git log--author.예 를 들 어 Git 소스 코드 에서 Linus 가 제출 한 부분 을 찾 아야 합 니 다.
$ 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

    날 짜 를 지정 하려 면 몇 가지 옵션 을 실행 할 수 있 습 니 다.--since 와--before,하지만--until 과--after 를 사용 할 수도 있 습 니 다.
    예 를 들 어 Git 프로젝트 의 3 주 전,4 월 18 일 이후 의 모든 제출 을 보 려 면 이것 을 실행 할 수 있 습 니 다.(저 는--no-merges 옵션 을 사용 하여 병합 제출 을 숨 길 수 있 습 니 다)
$ 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"

참고:
https://www.yuque.com/docs/share/a677764d-3081-443f-8012-5f421c09bfb4

좋은 웹페이지 즐겨찾기