Log

     

    git log

    저장소의 Commit history

     

     

     -(n)    최근 n 개의 커밋만 조회한다.
    --since, --after    명시한 날짜 이후의 커밋만 검색한다.
    --until, --before   명시한 날짜 이전의 커밋만 조회한다.
    --author    입력한 저자의 커밋만 보여준다.
    --committer 입력한 커미터의 커밋만 보여준다.

     

    git log -p -2

    -p

    각 Commit의 Diff 결과

    -2

    최근 두 개의 결과

     

    git --stat

    commit의 요약 정보

    수정된 파일명, 파일 수, 삭제 및 추가 내역

     

    git log --pretty=oneline

    Change id와 Commit Title을 한 줄씩 보여줌

     

    git log --pretty=format:"%h %s" --graph

     

    git show (change ID)

    Commit 조회

    git show (branch)

    Branch 조회

    git show HEAD^

    ^는 부모, 즉 이전 커밋

     

     

    Format

    Option  Description of Output
    %H  Commit hash
    %h  Abbreviated commit hash
    %T  Tree hash
    %t  Abbreviated tree hash
    %P  Parent hashes
    %p  Abbreviated parent hashes
    %an Author name
    %ae Author e-mail
    %ad Author date (format respects the –date= option)
    %ar Author date, relative
    %cn Committer name
    %ce Committer email
    %cd Committer date
    %cr Committer date, relative
    %s  Subject 

     

     

    'Git > Theory' 카테고리의 다른 글

    Tag  (0) 2013.05.02
    Remote  (0) 2013.05.02
    Amend  (0) 2013.04.30
    Diff  (0) 2013.04.30
    수정하고 저장소에 저장  (0) 2013.04.30

    댓글