概述:
将长长的名字变成个性化名称,将一个命令字符串赋值给一个变量。
1.为提交取一个别名
语法: git config --global alias.ci commit
$ vim README
Administrator@USER-20170424ZG MINGW64 ~/grit (master)
$ git status
On branch master
Your branch is ahead of 'origin/master' by 13 commits.
(use "git push" to publish your local commits)
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: README
Untracked files:
(use "git add <file>..." to include in what will be committed)
ticgit/
no changes added to commit (use "git add" and/or "git commit -a")
Administrator@USER-20170424ZG MINGW64 ~/grit (master)
$ git ci -a -m "README"
[master ac67cd6] README
1 file changed, 1 insertion(+), 1 deletion(-)
总结:git ci -a -m "README"
总结:本质理解别名就是字符串替代,但不能是git关键字