列出搜尋現有別名
你可以使用 --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- 只包含提交的別名