Skip to content

Instantly share code, notes, and snippets.

@fpersson
Forked from klang/git-dropbox.sh
Created September 15, 2012 09:22
Show Gist options
  • Save fpersson/3727090 to your computer and use it in GitHub Desktop.
Save fpersson/3727090 to your computer and use it in GitHub Desktop.
git repository on dropbox
export DROPBOX=~/Dropbox/repos
export newRepo=project-name
export NAME=$(git config --global --get user.name)
cd ~/projects/$newRepo
git init
git add .
git commit -m 'initial'
HERE=$(pwd)
mkdir -p $DROPBOX/${newRepo}.git
cd $DROPBOX/${newRepo}.git
git --bare init
echo "$newRepo" > description
echo "[gitweb] owner = \"$NAME\"" >> config
cd $HERE
git remote add origin $DROPBOX/${newRepo}.git
git push origin master
## check out repository like this:
## git clone ~/Dropbox/repos/${newRepo}.git
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment