Using Git with Dropbox
Posted on March 15, 2012 by Paul
Sometimes you want to keep a git repository private, at least temporary, without owning a server or a paid GitHub account. If you have a free Dropbox account you can host your private repo there.
Open a Terminal window if you are on Linux or Mac, on Windows just start a Bash window from your Git installation. Your Dropbox folder is created by default on HOME for Linux and Mac, or on MyDocuments in Windows.
Navigate to your Dropbox folder:
Once you are in ~/Dropbox you will want to create a bare git repo:
Now, you can use this folder as a private repository. Let’s try some tests:
Add the “remote” repo (the one from Dropbox) as origin:
Now, we can push the above files from the master branch to the remote origin:
If you want to simulate the workflow on a different machine clone repo01 change some files and save the changes:
You can go back to your original working folder and see the changes from the last step:
If you want to learn more about using Git I would recommend Pro Git by S. Chacon: