Schlagwort-Archiv: Git

Setting Up and Using a Shared Git Repository

I’m writing non-public code at the moment. Having it not in some kind of versioning system is weird and so 2010. Additionally, I want to have the same code available on my institute’s PC as well as on my Mac.
Since it’s non-public code, putting it on Github is not possible. Our institute’s Git server is also not running yet. What to do, until it’s up?

Easy! DIY Git+SSH!

First off, you need a bare repository to store your stuff in. If your usual Git repo is the front-end, this is the back-end. For me, this is on my institute’s PC, since it’s running most of the time and has SSH access anyway.

Now go to the directory where your files are located. For me, this is the directory on my institute’s PC, as I started working there.

On your second machine, just clone it via Git+SSH. For me, this on my Mac.

Now you can git push and git pull as much you like. Yay.

via this Stackoverflow post