如何从其他目录执行go get?

I'm writing an alias (unix) which will update a git repository and then call go get -d ./... (to load all dependencies).

Is there a way to call something like in git (below)?

git -C /my/path/with/git/repo pull origin master

In short, is there a way to pass in the context directory of a command to go get?

Just put a cd commad before the go get in your alias:

alias x="(cd /path/to/repo; go get -d ./...)"

Don't forget the parentheses, or you'll have to cd back to the original directory.