Skip to content

Instantly share code, notes, and snippets.

@klang
Created September 15, 2012 08:57
Show Gist options
  • Save klang/3727046 to your computer and use it in GitHub Desktop.
Save klang/3727046 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