Skip to content

Instantly share code, notes, and snippets.

@avclark
Created September 30, 2012 17:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save avclark/3807761 to your computer and use it in GitHub Desktop.
Save avclark/3807761 to your computer and use it in GitHub Desktop.
Bash script to automate new project creation using Alfred, Github and Beanstalk
# Create Beanstalk Repository
printf "git\n \n" | /Users/avclark/beanstalk repo:create {query}
# Create our new project directory
cd ~/desktop && mkdir {query} && cd {query}
# Clone our HTML-Base repo from Github
git clone https://github.com/avclark/HTML-Base.git
# Cleanup directory
cp -R HTML-Base/* . && rm -rf HTML-Base && rm readme.md
# Initialize git, add remote Beanstalk repo and push first commit
git init
git add .
git commit -m "First commit."
git remote add beanstalk git@bottlerocket-creative.beanstalkapp.com:/{query}.git
git push beanstalk master
# Add repo to Tower
/Applications/Tower.app/Contents/MacOS/gittower --add ~/desktop/{query}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment