Issue
While looking up syntax for git parameters involving one dash versus two dashes. I came across this post which explains that href="https://stackoverflow.com/questions/17320511/git-difference-on-parameter-one-dash-and-two-dashes">single dashes allow you to specify multiple single letter parameters with one dash and double dashes are for multi-letter parameters.
So in the case of git merge --no-ff <branch-name>
is -ff
calling -f
twice? If so, why?
Solution
So in the case of
git merge --no-ff <branch-name>
is-ff
calling-f
twice?
No, it isn't.
--no-ff
is the complete long option. Long options may contain dashes, because only whitespace separates command line arguments and a long option is always an entire command line argument (unlike short options, where one command line argument can contain multiple options, .i.e. -bar
contains b
a
and r
).
Answered By - SebDieBln Answer Checked By - Katrina (WPSolving Volunteer)