git 配置文件中找到 .gitconfig 或者 config(windows)
例子:
$ cat .git/config [core] repositoryformatversion = 0 filemode = true bare = false logallrefupdates = true ignorecase = true precomposeunicode = true [remote "origin"] url = git@github.com:michaelliao/learngit.git fetch = +refs/heads/*:refs/remotes/origin/* [branch "master"] remote = origin merge = refs/heads/master [alias]
co = checkout
ci = commit
br = branch
st = status
多个命令别名
[alias] ad = "!git init; git commit --allow-empty -m "empty initial commit""
直接执行 : git ad