Created
January 17, 2012 22:40
-
-
Save colwilson/1629479 to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env bash | |
#set -x # debugging | |
if [ -z "$1" ] | |
then | |
echo "please supply a repo name!" | |
exit | |
fi | |
# set the new repository name | |
proj=$1 | |
proj_dir=~/Projects | |
repo_dir=~/git_on_ubuntu_one | |
repo=${proj}.git | |
# ln -s Ubuntu\ One/git/ git_on_ubuntu_one | |
# create origin | |
cd ${repo_dir} | |
mkdir ${repo} | |
cd ${repo} | |
git init --bare | |
# create local repo | |
cd ${proj_dir} | |
mkdir ${proj} | |
cd ${proj}/ | |
git init | |
echo "*.pyc" >> .git/info/exclude # I use python | |
echo "lib/*" >> .git/info/exclude # I use python | |
echo "bin/" >> .git/info/exclude # I use python | |
echo "local/*" >> .git/info/exclude # I use python | |
echo "include/*" >> .git/info/exclude # I use python | |
echo "share/*" >> .git/info/exclude # I use python | |
touch README | |
# do your first push back to master | |
git add . | |
git commit -am "repository ${proj} pushed to origin" | |
git remote add origin ${repo_dir}/${repo} | |
git push origin master | |
# virtualenv | |
mkvirtualenv --distribute --no-site-packages ${proj} | |
cdvirtualenv | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment