git difference on parameter one dash and two dashes

前端 未结 3 926
不知归路
不知归路 2020-12-03 21:04

in git when I specify a parameter, ie

git log -n 5

what is the difference of using a parameter with one dash \"-\" as opposed to

3条回答
  •  再見小時候
    2020-12-03 21:30

    Git follows the GNU-adjusted POSIX conventions for command line arguments. Short, one letter options start with a single dash, long options start with two.

    Note that the linked page claims that this is the POSIX ("unix") standard, but that's not true. --option is a format pioneered by GNU.

提交回复
热议问题