Created
June 1, 2012 10:14
-
-
Save aslakhellesoy/2850971 to your computer and use it in GitHub Desktop.
Set up a git remote in your DropBox
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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