In the Bash manual, the exact behavior is described in 3.5.8 Filename Expansion and 3.5.8.1 Pattern Matching. (Be warned that bash is quite complicated and it processes command line arguments in a long sequence of steps.)
The word "quoting" is commonly used to say "remove the special meaning from". The command line git add Documentation/*.txt
invokes special behavior in the shell: bash replaces the parameter with some filenames. If you instead write git add Documentation/\*.txt
, you have quoted the *
: this process doesn't happen, and the parameter is passed to the program unchanged.
Another way to write this command would be git add 'Documentation/*.txt'
, which might be more obvious why it's commonly called "quoting". Using a backslash (or other) character to alter the meaning of a following character is sometimes called an escape. (And this probably originates from the use of ascii character 27 and/or the Esc key.)
It goes both ways sometimes: \*
might cause the *
to be treated as an ordinary character, but \n
might assign special meaning to an otherwise ordinary n
. It depends on the particular program.