What does . do in the command git add [duplicate]
Solution 1:
- The
.
is same as saying "current directory". So./script
means executescript
file in current directory. - The
..
is same as saying "parent directory" (one directory up).
Also, if you are in /
directory, there is no difference between:
/Document/myscript/script
and
./Document/myscript/script
So when you use the dot (.
or ..
), the path you provide is relative to current\parent directory you are in.
If you use full path, then the path is absolute path to the file.