create git repository in dropbox

$ cd ~/Dropbox
$ mkdir -p repos/your-repo-name
$ git init --bare repos/your-repo-name
Initialized empty Git repository in /Users/xxxxxx/Dropbox/repos/your-repo-name/

link local repo to dropbox repo

$ cd ~/ProjectFolder
$ git init .
Initialized empty Git repository in /Users/xxxxx/ProjectFolder/
$ git add .
$ git commit --all -m "Initial commit"
$ git remote add dropbox /Users/xxxxx/Dropbox/repos/your-repo-name/
$ git push dropbox master

clone local repo from dropbox

$ cd ~/Projects
$ git clone -o dropbox /Users/xxxxx/Dropbox/repos/your-repo-name/

push changes to dropbox repo

$ git commit --all -m "Changes made!"
$ git push dropbox master

get latest change from dropbox repo

$ git pull dropbox master


Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License