首页 > .gitconfig里,怎么让一个别名对应两条指令?

.gitconfig里,怎么让一个别名对应两条指令?

我经常做这个操作:

bash$ git add --update
$ git status --short

于是,在.gitconfig里加入了

ini[alias]
    au = add --update
    ss = status --short

但是,这样还是需要输入

bash$ git au; git ss

怎样才能把这两条指令简化成$ git au

注:.bashrc的方法不算数。


类似这样。

git config --global alias.up '!git remote update -p; git merge --ff-only @{u}'

执行git up,就会执行那三条命令。

【热门文章】
【热门文章】