问题描述
许多git别名的缩写/缩写/ TLA都很短,命令行也很长,几乎无法理解。
是否有“正确”的方法在别名中添加尾随注释,以便我可以记住它的用途或从何处获得它?
这取决于它是通过git config --global alias.<shrt> 'cmd'
命令创建还是通过直接编辑我的.gitconfig
文件,以及它是否是shell !
命令等。
如果有一种“一刀切”的方法,那就太好了。
解决方法
配置文件具有注释语法,请使用它。
Syntax
中git help config
部分的前两个句子:
The syntax is fairly flexible and permissive; whitespaces are mostly ignored.
The # and ; characters begin comments to the end of line,blank lines are ignored.