Quick and dirty ad-hoc git hosting

Author:Wojciech Muła
Addded on:2014-03-19

Recently I needed to synchronize my local repository with a remote machine, just for full backup. It's really simple if you have standard Linux tools (Cygwin works too, of course).

  1. in a working directory run:

    $ pwd
    #         ^^^^^^^
    $ git update-server-info
  2. in the parent directory start HTTP server:

    $ cd ..
    $ pwd
    $ python -m SimpleHTTPServer
    Serving HTTP on port 8000 ...
  3. on a remote machine clone/pull/whatever:

    $ git clone http://your_ip:8000/project/.git

Step 1 have to be executed manually when the local repository has changed.