Algorithms For Business Resource Optimization

A Quick Way to 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
cd ~/myProject
git init
git add .

Create and setup the Dropbox base repo

mkdir -p ~/Dropbox/Git
cd ~/Dropbox/Git
git init --bare myProject.git

Add the remote Dropbox folder

cd ~/myProject
git remote add origin ~/Dropbox/Git/myProject.git

Add a first commit

echo >> ""
git add *
git commit -m "first commit"

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

cd ~/dev

git clone

sudo cp ~/dev/gitdropbox/gitdropbox /usr/local/bin/

sudo chmod +x usr/local/bin/gitdropbox

gitdropbox newProject

0 0 votes
Article Rating
Notify of

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Inline Feedbacks
View all comments
Would love your thoughts, please comment.x