提示和技巧
自動補齊
source ~/git-completion.bash$ git co<tab><tab>
commit config$ git log --s<tab>
--shortstat --since= --src-prefix= --stat --summaryGit 命令別名
Last updated
source ~/git-completion.bash$ git co<tab><tab>
commit config$ git log --s<tab>
--shortstat --since= --src-prefix= --stat --summaryLast updated
$ git config --global alias.co checkout
$ git config --global alias.br branch
$ git config --global alias.ci commit
$ git config --global alias.st status$ git config --global alias.unstage 'reset HEAD --'$ git unstage fileA
$ git reset HEAD fileA$ git config --global alias.last 'log -1 HEAD'$ git last
commit 66938dae3329c7aebe598c2246a8e6af90d04646
Author: Josh Goebel <dreamer3@example.com>
Date: Tue Aug 26 19:48:51 2008 +0800
test for current head
Signed-off-by: Scott Chacon <schacon@example.com>$ git config --global alias.visual '!gitk'