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

for example:

  • Jenkins not waiting on call to a bash script with expect
  • Git (GitHub) commit at past date
  • .gitconfig not following bash alias for default editor command?
  • Cygwin: color coding and branch info for git?
  • Why doesn't my git auto-update Expect script work?
  • Git 2.5.1's bash console doesn't open python interpreter
  •  git commit --amend -m "New commit message"

    I observed the same approach on some linux tools.

  • .gitignore isn't ignoring itself
  • How do I create tag with certain commits and push it to origin?
  • A true, robust, git svn externals solution?
  • Find out git branch creator
  • Git won't show log unless I am in the project directory
  • Should I generate new SSH key pair for every workstation or reuse a single one?
  • 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 <-> 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”

    Git Baby is a git and github fan, let's start git clone.