Skip to content

Instantly share code, notes, and snippets.

View rava-dosa's full-sized avatar

Apoorva Kumar rava-dosa

View GitHub Profile
@rava-dosa
rava-dosa / 0-TLDR.md
Created October 28, 2017 13:43 — forked from RichardBronosky/0-TLDR.md
How to easily launch a temporary one-off git server from any local repository, to enable a peer-to-peer git workflow.

User 1

remote_server=172.31.0.1
git daemon --verbose --export-all --base-path=.git --reuseaddr --strict-paths .git/ > /tmp/git-serve.log 2>&1 &
ssh -R 9418:localhost:9418 ec2-user@$remote_server
git clone git://localhost/ local-repo-name

Repo from workstation is cloned onto server.

User 2