I don't always want to push my changes to my online repository, just to pull them
an instant later when I switch the machine I'm working with.
So how to access a git repository on a machine in the same network?
(I'm working on Mac OS but this should be applicable for Linux as well.)
First make sure ssh is enabled and the user you log in with, has access to the directory
where the remote repository is located.
git pull git+ssh://USER@IP_OF_REMOTE_MACHINE/PATH_TO_REPO BRANCH
git pull git+ssh://email@example.com/~/my/repo master
Maybe you'll get following exception:
bash: git-upload-pack: command not found
fatal: The remote end hung up unexpectedly
This stackoverflow thread pointed me into the right direction.
In my case I had to edit the .bashrc on the remote machine located
in the home directory of the user I logged in with.
I added git-upload-pack located in /usr/local/git/bin to the PATH and it worked like