3
我經常跑如何配置參數化的git別名?
git log -10 --author="<author name>" --grep="<story of interest>"
是否有可能配置類似
git by "<author name>" "<story of interest>" -10
,將完成同樣的事情git的別名?
The documentation沒有提及參數。
我經常跑如何配置參數化的git別名?
git log -10 --author="<author name>" --grep="<story of interest>"
是否有可能配置類似
git by "<author name>" "<story of interest>" -10
,將完成同樣的事情git的別名?
The documentation沒有提及參數。
您可以創建別名作爲一個shell命令:
git config alias.agrep '!f() { git log -10 --author="$1" --grep="$2"; }; f'
現在叫git agrep
有兩個參數:git agrep Matt test
。
請參閱GitAlias repo瞭解幾十個有用的別名和示例。充分披露:我是貢獻者。
完美,謝謝! – Matt
你可以做一個快速的bash腳本。 – alex
這顛覆了這個問題。 – Matt