Last Updated: February 25, 2016
·
259
· micmath

Use Dropbox as Your Repo

Here's a quick recipe to create a private git repo in your DropBox folder. A good way to quickly add some version control goodness to a project you're about to start, and because it's on DropBox the source is: securely backed-up, and accessible from multiple computers.

cd ~/Dropbox/repos
mkdir myProject.git
cd myProject.git/
git --bare init

cd ~/projects/
git clone ~/Dropbox/repos/myProject.git myProject
cd myProject/
touch README.md
git add README.md 
git commit README.md -m 'Initial commit.'
git remote add dropbox file://$HOME/Dropbox/repos/myProject.git
git push dropbox master