alias
git alias ๊ธฐ๋ฅ์ ํตํด ์ถ์ฝ์ด ํํ๋ก git command ๋ฅผ ์ฌ์ฉํ ์ ์๋ค
์ค์
$ git config --global alias.co checkout
$ git config --global alias.br branch
$ git config --global alias.ci commit
$ git config --global alias.st status
Shell
๋ณต์ฌ
์ฌ์ฉ
$ git co BRANCH
Switched to branch 'BRANCH'
$ git br
* master
Shell
๋ณต์ฌ
๊ธฐํ
โข
์ง์ gitconfig ํ์ผ์ ์์ ํด์ ์ค์ ํ ์ ์๋ค
โข
๋ด๊ฐ ์ฃผ๋ก ์ฌ์ฉํ๋ alias ๋ค์ ์๋์ ๊ฐ๋ค
$ vim ~/.gitconfig
[alias]
co = checkout
br = branch
ci = commit
st = status
unstage = reset HEAD --
last = log -1 HEAD -p
hide = update-index --assume-unchanged
unhide = update-index --no-assume-unchanged
$ git unstage FILE_NAME
$ git last
Bash
๋ณต์ฌ
์ฐธ๊ณ
โข
https://git-scm.com/book/ko/v2/Git%EC%9D%98-%EA%B8%B0%EC%B4%88-Git-Alias



