How to quickly share a git repository
HowTo
Today I had to simply share a local repository with a collegue. It was pretty easy, just do:
cd MyGitProject git daemon --reuseaddr --verbose --base-path=. --export-all ./.git
the reuseaddr option will reuse connection, verbose will let you see what will happen, base-path is for using relative paths and export-all is to export all the repos in the .git folder. Easy, isn’t it?
Tell your friend/collegue to do
git clone git://your-ip-address-here/ MyGitProject
And it will start downloading the new repo 🙂 Amazing, isn’t it ? PS: do not use bad GUIs, they will mess the command line to get the repo. just open a shell, even on windows, and type that command.