Skip to content

Instantly share code, notes, and snippets.

@zinkkrysty
Forked from mrdanadams/create_origin.sh
Last active December 9, 2015 16:58
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zinkkrysty/4300389 to your computer and use it in GitHub Desktop.
Save zinkkrysty/4300389 to your computer and use it in GitHub Desktop.
Use Dropbox for a git repository in the cloud. I use it for backup purposes.
# Assuming you already have a git repo somewhere on your drive
# And the project name is "yourproject"
$ cd ~/Dropbox
$ mkdir yourproject_backup
$ cd yourproject_backup
$ git clone --bare -l path/to/your/existent/git/repo/yourproject yourproject.git
$ cd path/to/your/existent/git/repo/yourproject
$ git remote add backup ~/Dropbox/yourproject-backup/yourproject.git
$ git push backup master
# Should say already up-to-date because you cloned it earlier, now just enjoy backup in the cloud at a simple command
@573
Copy link

573 commented Feb 21, 2013

good idea thanx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment