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
for example:
git commit --amend -m "New commit message"
I observed the same approach on some linux tools.
The values that are declared within a function when the function is called are known as an argument. Whereas, the variables that are defined when the function is declared are known as a parameter.
Variables are used to pass the data between the activities of same project, while Arguments are used to pass the data between the workflows or projects. Arguments have global scope in a workflow or project by default unlike variables where we can define the scope for them manually as per the requirement.
Logic is the science that evaluates arguments. An argument is a group of statements including one or more premises and one and only one conclusion.
-- is used for multicharacter arguments, - is for singlecharacter arguments.
For example, those are in many programs equivalent:
program -h
<-> program --help
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"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With