develog

[git] log 본문

Dev/git

[git] log

냐옴 2021. 6. 30. 09:34
## 한 줄로 출력, 컬럼 간격 맞춤
git log --pretty='%C(magenta)%h %C(green)%ci %C(blue)%<(15,trunc)%cn %C(cyan)%<(20,trunc)%ce %C(yellow)%<(30,trunc)%s %C(auto)%d' --all
## 여러 줄로 출력
git log --pretty='%C(magenta)%h %C(green)%ci %C(auto)%d %n        %C(blue)%cn %C(cyan)%ce%n%n        %C(yellow)%s %n' --all
## graph 출력
git log --pretty='%C(magenta)%h %C(green)%ci %C(auto)%d' --all --graph
git log --pretty='%h %ci %cn %ce %s %d' --all
git log --pretty=format:'%h %ci %cn %ce %s %d' --all
git log --pretty=format:'%C(magenta)%h %C(green)%ci %C(blue)%cn %C(cyan)%ce %Creset- %C(yellow)%s %C(auto)%d' --all --graph
# 소스 코드의 변경된 내용을 출력한다
git log -p

# 최근 n 개의 커밋만 조회한다.
git log -(n)

# 지정한 날짜 이전의 커밋만 조회한다.
git log --before
git log --until

# 지정한 날짜 이후의 커밋만 검색한다.
git log --after="2023-04-05 00:00:00"
git log --since

# 저자의 커밋만 보여준다.
git log --author

# 커미터의 커밋만 보여준다.
git log --committer
## 현재 브랜치의 로그 조회
$ git log

## 특정 브랜치의 로그 조회
$ git log master
$ git log feature

## 모든 브랜치의 로그 조회
$ git log --all
$ git log --branches

## 그래프 보기
$ git log --graph
$ git log --oneline
$ git log --decorate
$ git log --graph --oneline --decorate
$ git log --all --graph --oneline --decorate
$ git log master --graph --oneline --decorate

# commit 텍스트 길이 줄여서 출력
git log --abbrev-commit

#
git log --format=short
git log --format=full
git log --format=fuller

git log --raw
git log --raw --date=iso

git log --pretty=oneline
git log --pretty=short
git log --pretty=full
git log --pretty=fuller

git log --date=iso
git log --date=iso --all --name-only
git log --date=iso --all --name-status

git log --stat

 

 

https://git-scm.com/docs/pretty-formats

 

Git - pretty-formats Documentation

If the commit is a merge, and if the pretty-format is not oneline, email or raw, an additional line is inserted before the Author: line. This line begins with "Merge: " and the hashes of ancestral commits are printed, separated by spaces. Note that the lis

git-scm.com

 

https://git-scm.com/docs/git-status#_output

 

Git - git-status Documentation

By default, git status will automatically refresh the index, updating the cached stat information from the working tree and writing out the result. Writing out the updated index is an optimization that isn’t strictly necessary (status computes the values

git-scm.com

 

'Dev > git' 카테고리의 다른 글

[git] 참고  (0) 2021.06.30
[git] stash  (0) 2021.06.30
[git] fatal: refusing to merge unrelated histories  (0) 2021.05.19
[windows] docker 로 gitlab 설치  (0) 2021.05.13
[mac] docker 로 gitlab 설치  (0) 2021.05.12
Comments