What is the difference between –parameter and -parameter?
I used git for some time now, but mostly I preferred the integration with Intelij IDEA. Now, in order to extend my knowledge and understanding of the system I decided to use the command line more. What I observed is that there are two types of parameters:
--parameter and -parameter
git commit --amend -m "New commit message"
I observed the same approach on some linux tools.
One Solution collect form web for “What is the difference between –parameter and -parameter?”
— is used for multicharacter arguments, – is for singlecharacter arguments.
For example, those are in many programs equivalent:
program -h <->
The reason is, if you use -, you can specify many arguments at once, for example:
ls -lah gives a list of the directory content, all content, human-readible.
It needs to know that you don’t mean the argument “–lah”, but “-l -a -h”