This isn't a git question per se. If you were hosting, say, a Subversion repository on your laptop, other developers will still have trouble talking to it while you're in a hotel room. You'll need to make your repos available by tunneling through other protocols or pushing them to mutually accessible resources.
The worst but still operable case is when repos can't talk to each other directly, but you can email patches to each other with git send-email
.
Next up the ladder, say you have a shell account with an internet provider that also provides ~/public_html
. In that case, you'd create in that webspace a bare repository as described in Setting up a git repository which can be pushed into and pulled from over HTTP(S). Your pushes would be authenticated via SSH, and your collaborators would set up remotes to pull from the appropriate HTTP URL.
That's marginally better than email but slow and klunky. Now git has the benefit of a smart HTTP backend where pulls over HTTP are much faster. With either the smart or the dumb backend, you can enable authentication.
If you don't care about authentication, you could also serve your repository with git daemon
from a host that everyone can reach.
If you both have shell access to the same host, you could exchange work directly after connecting to that box. You have many options here:
- full shell access: same account, same (centralized) repo
- full shell access: different accounts, separate repos,
git pull
- allow collaborators git-only access to your shell account
- (and so on)
The above might do in a pinch, but all the manual care and feeding will become tiresome. Outsource that headache to GitHub or Gitorious.