0

git config --global alias.a '!git commit -a -m "commit" && git push'

不知道如何使用!sh

4

1 回答 1

1

想要在别名中使用参数?

尝试使用临时 bash 功能:

git config --global alias.a '!f() { git commit -am "$1" && git push; }; f'

# then use it with
git a "My message is awesome."
于 2020-11-27T13:49:11.837 回答