$ git log

git log HEAD -1: HEAD만 보여줌git log HEAD -2: HEAD + 이전1개-p$ git log -p
-p 옵션은 diff
git log -p HEAD -1: HEAD의 Diff view-p --diff-filter=$ git log -p --diff-filter=[FILTER]
diff에 filter 건다 (대문자만 사용할 것)
| filter | Description |
|---|---|
| A | added file |
| M | modified |
| C | copied |
| R | renamed |
| D | deleted |
| T | changed |
| b | parsing broken |
A$ git log -p --diff-filter=A

D$ git lob -p --diff-filter=D

--follow <FILE><FILE>에 변화가 있을 때만 출력<FILE> 키워드 찾지 않음$ git log --all -p --follow io.h
-S "Keyword"$ git log --all -p -S "Copyright"
--grep "Keyword"$ git log --all -p --grep "Copyright"
since= 해당 일 이상until= 해당 일 미만$ git log --all --since=2012-08-18 --until=2012-08-19
--pretty=""| 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 log --pretty=format:"%h - %an, %ar : %s"
ca82a6d - Scott Chacon, 11 months ago : changed the version number
085bb3b - Scott Chacon, 11 months ago : removed unnecessary test code
a11bef0 - Scott Chacon, 11 months ago : first commit
주의! -p 옵션도 함께 쓰면 diff 때매 다나옴
--stat$ git log --stat
commit hash
git message
changed/file1 | 1 -
changed/file2 | 2 ++
...
--patch-with-statlog <tag>git log <TAG>$ git log --oneline --graph tig-1.1 (--all 옵션은 없어야한다)

git log <Newtag>...<Oldtag>$ git log --oneline --graph tig-1.1...tig-1.0 --boundary (--all 옵션은 없어야한다)tig-1.1 ~~ tig-1.0 --boundary 를 추가해야 경계값이 포함됨
