git: simplest way to share a repository between two laptops on a local network?

If my friend has a git repository on his laptop, and we are both connect to the same LAN, what’s the absolute simplest way for me to clone that repository?

As far as I can tell, the options are:

  • Git version compatibility
  • Checking for a dirty index or untracked files with Git
  • When running git status the message "your branch is up-to-date with 'origin/branch' only appears some times
  • How to tell if a file is git tracked (by shell exit code)?
  • How do I merge a parent fork?
  • Why do files in the working directory get the modified status on switching between Git branches?
    • Getting SSH access to his machine
    • Installing a web server and using git instaweb

    But neither of these are particularly simple (or, at least, as simple as hg serve)… Is there anything better?

  • Referencing the child of a commit in Git
  • What does git add . (git add single dot) command do?
  • How to update a single commit on a Gem?
  • My project return error timeout after 10min
  • Why does the the same conflict reappear when I use git rebase?
  • How do I see changes in the git index?
  • 5 Solutions collect form web for “git: simplest way to share a repository between two laptops on a local network?”

    I don’t remember what all the options mean, so it may take some playing, but I think git daemon does what you want.
    I have had it work in the past.

    cd project
    git daemon --reuseaddr --base-path=.git --export-all --verbose

    To access: git pull git://HOST/

    See answer

    For cloning only, you want to use git daemon --export-all $PWD You can configure it to be read/write, but that is very insecure.

    git-instaweb does not allow you to clone a repository.

    Of course using github is a convenient way to share repositories without lots of configuration (though setting up an ssh server is usually not very difficult).

    Not exactly point-and-click, but this might help:

    Also, if you have access to his drive via any type of share (NFS, Samba, etc) then you can clone via the share name.

    Oh, and there’s also git-daemon.

    I was wondering if laptops (behind NAT) could remotely address each other (with logical rather than hostnames) via XMPP, if a tunneling of SSH over XMPP existed. I found but it seems old and unloved, and not clear whether intermediate servers need to support the XMPP extensions it uses.

    Git Baby is a git and github fan, let's start git clone.