Saturday 29 November 2014

Create a GIT sandbox server for ad-hoc work

Some months ago I was working out of the office at a client's location and I had to move my development environment there, but due to a tight and restrictive IT policy, me a some colleagues were unable to set up our current GIT repository and share our work (the proposed zip-share-meld was not tempting at all...).  The easiest solution would be to host the repository on my laptop, but then again, setting up our GIT repo in a Raspberry Pi is more fun, specially when you have a video projector available at the office, and a RetroPie running with 2 extra game controllers.

Create a fresh bare repository on the server:
git init --bare newrepo.git
Add it as a remote in our local repo:
git remote add newrepo  git://user@server.com/newrepo.git
Push all branches:
git push --all newrepo

No comments: