executing a git pull from a different directory

I had this question, too. I found the answer in the git documentation (https://git-scm.com/docs/git).

Run the command

git -C <git-working-directory> pull <git remote>

The specific command to answer this question is

git -C checkout/myApp/ pull

Note that it is important -C <git-working-directory> comes before the pull command and any additional pull options can be specified at the end of the command. In the example above, the git clone command would have setup the default remote repository ~/apps/myapp so it is not required to specify the remote repository.


git -C ~/Documents/blar/blar/directory/ pull

This worked for me after hours of searching. I'm on a Mac in Terminal.