share git repositories with dropbox
create a dropbox folder for your repositories:
mkdir -p ~/Dropbox/repositories
cd ~/Dropbox/repositories
create a bare repository:
mkdir new_project.git
cd new_project.git
git --bare init
change the directory to your project:
cd ~/projects/new_project
add dropbox remote to your existing repository:
git remote add dropbox ~/Dropbox/repositories/new_project.git
add your files and push to dropbox:
git push dropbox master
Written by Daniel Leidisch
Related protips
1 Response
Thanks for sharing these steps, as it is quite useful. I love the idea of using Dropbox as my repositories location, that way a machine crash does not mean you repos are lost.
But, we must keep in mind that using these repo's for collaboration with others will lead to corruption of the repos themselves. The reason is explained here: http://www.unityisplural.com/2012/02/git-dropbox-bad.html
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Dropbox
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#