히스토리 검색 (기본)

$ git log
# Output
commit a32b4d3a362c9c9fb6adfd0aae573bf8223ed774
Author: tez <tez@tez.kr>
Date: Sun Dec 11 15:45:12 2016 +0900
2nd commit
commit cae1239cdda71d58bcc1315ef95dcb94a5df3cac
Author: tez <tez@tez.kr>
Date: Sun Dec 11 15:44:46 2016 +0900
1st commit

각 커밋의 diff 결과 표시

$ git log -p
# Output
commit a32b4d3a362c9c9fb6adfd0aae573bf8223ed774
Author: tez <tez@tez.kr>
Date: Sun Dec 11 15:45:12 2016 +0900
2nd commit
diff --git a/test.file b/test.file
index 3b18e51..d0c4c4f 100644
--- a/test.file
+++ b/test.file
@@ -1 +1,3 @@
hello world
+
+text text blabla
commit cae1239cdda71d58bcc1315ef95dcb94a5df3cac
Author: tez <tez@tez.kr>
Date: Sun Dec 11 15:44:46 2016 +0900
1st commit
diff --git a/test.file b/test.file
new file mode 100644
index 0000000..3b18e51
--- /dev/null
+++ b/test.file
@@ -0,0 +1 @@
+hello world

특정 히스토리 개수만 표시

$ git log -[count]
# ex) git log -2
# Output
commit 15b0e2a2a3caf8e6d5323e736158c9eed3f81d80
Author: Taesun Park <perfect@foodfly.co.kr>
Date: Sun Dec 11 15:45:50 2016 +0900
3rd commit

commit a32b4d3a362c9c9fb6adfd0aae573bf8223ed774
Author: Taesun Park <perfect@foodfly.co.kr>
Date: Sun Dec 11 15:45:12 2016 +0900
2nd commit


반응형

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

[Push] 강제 푸시  (0) 2016.12.11
[Sync] 원격-로컬 브랜치 동기화  (0) 2016.08.21
[Color] 출력물에 색 입히기  (0) 2016.08.21