Skip to content

Instantly share code, notes, and snippets.

@bobisme
Last active February 20, 2016 04:51
Show Gist options
  • Save bobisme/458c7e3eb19e3992c3b8 to your computer and use it in GitHub Desktop.
Save bobisme/458c7e3eb19e3992c3b8 to your computer and use it in GitHub Desktop.
New git project using dropbox.

Make a new "bare" repo in dropbox

mkdir ~/Dropbox/git/new-project.git
git init --bare ~/Dropbox/git/new-project.git
cd ~/src
git clone ~/Dropbox/git/new-project.git

This creates the directory ~/src/new-project with dropbox as the "origin" remote.

cd new-project

Rename it for clarity.

git remote rename origin dropbox

Let's make an alias to keep everything in sync.

git config alias.backup 'push dropbox --all --prune --follow-tags'

Now let's try it.

touch .gitignore
git add .gitignore
git commit -m 'INIT'
git backup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment