I wish I knew that earlier, it would save a lot of cd:

$ git -C /dir/you/want/to/pull/push push
# with verbose output
$ git -C /dir/you/want/to/pull/push push -v

Info

-C flag needs git > 1.8.5

It means that with -C flag you can specify the directory you want to interact with. I normally go into the directory than push:

$ cd /dir/you/want/to/pull/push && git pull # or push

Not anymore!

All done.


Reference: