Suppose I have a git working directory, i.e. the directory which has a subdirectory called .git
.
I wonder if the current directory matters when I run a git command. Is it okay to run a git command
directly under the working directory
directly under some subdirectory of (subdirectory of) the working directory
directly under the parent directory of the working directory?
Consider
- git commands which can take an argument which specifies some files, e.g.
git add
, and - git commands which doesn't take an argument that specifies some files, e.g.
git pull
,git push
.