-
-
Save fpersson/3727090 to your computer and use it in GitHub Desktop.
git repository on dropbox
This file contains 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
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