问题描述
我已经知道如何制作别名,简单的别名,复杂的别名,除了...以外,一切都很好。
我现在想记录我的别名,以便当我这样做
git my-super-alias --help
不仅仅是获取:
'my-super-alias' is aliased to '[super specific set of instructions]'
我会得到:
'my-super-alias' is aliased to '[super specific set of instructions]' this serves [super specific purpose] which is useful for [super specific,yet not very obvIoUs at first glance,reason]
有什么办法可以在本地git config中使用它吗?
解决方法
你可以让超级特定指令集的开头成为他们的帮助。
$ git config alias.testhelp '!# My super specific command does AMAZING THINGS!
date'
$ git testhelp
Fri Jan 29 11:29:52 AM PST 2021
$ git help testhelp
'testhelp ' is aliased to '!# My super specific command does AMAZING THINGS!
date'
$