Last Updated: January 04, 2021
· dleidisch

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

1 Response
Add your 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:

over 1 year ago ·