티스토리 뷰
Git Alias 설정
git을 설치한 상태에서 .gitconfig 파일을 열어서 alias 영역을 수정하면 된다.
[alias]
co = checkout
br = branch
ci = commit
st = status
unstage = reset HEAD --
last = log -2 HEAD -p
hide = update-index --assume-unchanged
unhide = update-index --no-assume-unchanged
lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%C(bold blue)<%an>%Creset' --abbrev-commit
feature 생성
git flow feature start [브랜치 이름]
feature 종료
git flow feature finish [브랜치 이름]
remote 최신
git fetch
현재 상태 확인
git status
pull 받아야 할 list count
git rev-list --count develop...origin/develop
pull 받아야 할 list
git log develop...origin/develop
가지로 보여주기
git log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' —all
가지로 보여주기 (log 제외)
git log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' —all
원격 브랜치와 실시간으로 안될 때
git branch --set-upstream-to=origin/master master
'Git & Docker' 카테고리의 다른 글
[Docker] 기본 명령어 (0) | 2019.08.14 |
---|---|
[Git] 기본 명령어 (0) | 2019.08.14 |
댓글