Skip to content

Instantly share code, notes, and snippets.

@aslakhellesoy
Created June 1, 2012 10:14
Show Gist options
  • Star 9 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save aslakhellesoy/2850971 to your computer and use it in GitHub Desktop.
Save aslakhellesoy/2850971 to your computer and use it in GitHub Desktop.
Set up a git remote in your DropBox
#!/bin/bash
# Call this script from a local git repo to set up a dropbox remote you can push and pull to
# I keep this script under ~/Dropbox/git/gitbox.sh
# Inspired from http://stackoverflow.com/questions/1960799/using-gitdropbox-together-effectively
PWD=`pwd`
PROJECT=`basename $PWD`
pushd $HOME/Dropbox/git
git init --bare $PROJECT.git
popd
git remote add origin $HOME/Dropbox/git/$PROJECT.git
git push -u origin master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment