Use Dropbox as a Git Repo

It is pretty simple, all you need to do is create the base repo in your dropbox folder and push your code.

Create a git project

mkdir -p ~/myProject 

Create and setup the Dropbox base repo

mkdir -p ~/Dropbox/Git 

Add the remote Dropbox folder

cd ~/myProject 

Add a first commit

echo >> "" 

Push the code into the remote Dropbox

git push -u origin master

gitdropbox: a script that creates a remote Dropbox repo

Here is a script that creates a new git project in ~/"new project" and initializes a git repo on your Dropbox folder (~/Dropbox/Git/"new project").

gitdropbox myProject will do all of the above in one command.

The script is available on


mkdir ~/dev 

Originally published at on January 1, 2020.

Operations Research, Decision Aid and Optimization

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store