Skip to content

Instantly share code, notes, and snippets.

@mnewt
Created June 3, 2012 01:52
Show Gist options
  • Save mnewt/2860939 to your computer and use it in GitHub Desktop.
Save mnewt/2860939 to your computer and use it in GitHub Desktop.
git reference
#set up git on project directorygit init
git add .
git commit -m "Initial commit"
#set up remote push
git remote add origin git@github.com:mattnewton/app_name.git
git push origin master
#initial heroku setup
#download and install heroku toolbelt
heroku login
heroku keys:add ~/.ssh/id_dsa.pub
#initial deploy to heroku
heroku create --stack cedar
git push heroku master
#status
git status
#update git working branch
git add .
git commit -a -m "next commit"
#push updates to remote
git push
#===================================
# WORKING INSTRUCTIONS
#===================================
#1. start new branch
git checkout master
git checkout -b branch-name
#2. modify files
#3. merge branch back to master
git add .
git commit -m "back to master"
git checkout master
git merge branch-name
#4a. push updates to master repository
git push
#4b. heroku specific
git push heroku
heroku run rake db:migrate
heroku run rake db:reset
heroku run rake db:populate
heroku open
heroku logs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment