..Clone..
git clone https://github.com/haeol/Genesys
..Make a branch…
git branch new_branch
git checkout new_branch (this will switch to your new branch) git branch (this will check your current branch)
… you do some work on your branch…
git add . (add every change to the commit)
git commit -m “This is the work I did!” (describe your changes)
git push origin branch_i_am_on (upload it to the server)
…once we finialize on your changes, push to master…
git status (see the files that you made changes to; file name should be highlighted in red)
git add (don't stage all your files to commit..add only the file you made changes to)
git commit -m “This is the work I did!” (describe your changes)
git push origin master (upload it to master branch)
…if you want to update from master; usually after you merge something to master…
git pull origin master (download changes in master)
git merge master (combine your branch with the master)
..installing postgres on mac..
brew install postgres
..configuring postgres..
pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start (start the server)
createuser -s -r genesys (create a user for postgres named genesys, don't change the name)
rake db:create:all (if db is not yet created)
rake db:migrate (if db is already created)
rails s (should now work)
..using postgres..every time you start the server, you have to start postgres first..
pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start (start the server)
pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log stop (stop the server)
..updating to heroku..
RAILS_ENV=production bundle exec rake assets:precompile