列出搜索现有别名
你可以使用 --get-regexp 列出现有的 git 别名 :
$ git config --get-regexp '^alias\.'
搜索别名
要搜索别名 ,请将以下内容添加到 [alias] 下的 .gitconfig:
aliases = !git config --list | grep ^alias\\. | cut -c 7- | grep -Ei --color \"$1\" "#"
然后你可以:
git aliases- 显示所有别名git aliases commit- 只包含提交的别名