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
  • Select an option

  • Save zinkkrysty/4300389 to your computer and use it in GitHub Desktop.

Select an option

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

573 commented Feb 21, 2013

Copy link
Copy Markdown

good idea thanx

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