News for the ‘Programming’ Category

Setting up a private Git repo with Dropbox

So you’re at that point in your life where you need to have a git repo for your project but you can’t use github because it needs to be private and you don’t want to pay. Well, you can actually set up your own repo fairly easily using Dropbox.

You’ll need a terminal prompt with git installed to do this. Linux users can simply install git and they’re good to go, Windows users should look at http://code.google.com/p/msysgit/.

First, find out where your dropbox files are located.

Cd to your dropbox folder and make a directory for your repo, then cd to it.

Run ‘git –bare init’ to create the repository.

Cd to a folder in your projects directory, and run these commands:

‘git remote add dropbox file://path/to/your/dropbox/dir/arepo’

‘git push dropbox master’

Congradulations, you’ve created a git repo!

Now, to check it out from another computer you just need to run this command:

‘git clone -o dropbox file://path/to/dropbox/repo’

Now you have your own private git repo.

Posted: September 12th, 2012
Categories: Programming
Tags:
Comments: No Comments.