Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

So my friend and I were trying to learn some coding together. We had our laptops on the same wifi and I wanted us to use git without depending on GitHub, but I was completely stumped as to how to actually connect us together. I don't want us to setup SSH servers on each other's laptops, giving each other full access to our computers, and sending patches to each other across the living room seems overkill when we're just sitting around hacking away on our keyboards wanting to share what we've come up with every few minutes or so. I still have no idea how I would solve this. Maybe I'd just try coding with a syncthing directory shared between us, but then that's totally giving up on git



If you put a git repository in a shared drive via git clone --bare (makes it not checkout a branch, and doesn't setup any origin type stuff), you can use that as a remote, pushing/pulling etc. Setting up a network available shared drive on one of the two computers shouldn't be too difficult, and by git's distributed nature it's not exactly the end of the world if access temporary.

Another option would be to use the email-based workflow, but that's quite different from most people's expected git experience.


I think if you just setup SSH a certain way you can then use git or sftp for access:

        Match User gituser
            ChrootDirectory /srv/git_chroot
            ForceCommand internal-sftp
            AllowTcpForwarding no
            X11Forwarding no
            PermitTTY no
But tbh sending patches is fun and easy! After you force yourself to do it a few times you might even prefer it to push/pull


Just use netcat and send a git bundle across?

Or if you are using Linux, there is a httpd (web server) in the busybox package:

  busybox httpd -f -p 0.0.0.0:10080 -h ~/public/




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: