Don*_*lon 11 options git arguments
以下工作:
git -C ~/dotfiles status
Run Code Online (Sandbox Code Playgroud)
但这失败了:
git status -C ~/dotfiles
Run Code Online (Sandbox Code Playgroud)
为什么是这样?
l0b*_*0b0 31
这是因为它-C
是一个全局选项,不“属于”status
操作。这是一种常见的模式,产生的概要如下所示:
command [global options] action [action-specific options]
Run Code Online (Sandbox Code Playgroud)
git --help
列出 Git 的全局选项,并man git
详细介绍。