Very common recurring workflow with Git

Public, Workflows, Git

harrylevine

Created: Nov 15, 2014     Updated: Nov 15, 2014


$ git branch --> Should be on your master branch
$ git checkout -b welcome-controller --> This creates a new branch called welcome-controller. Replace "welcome-controller" with name of your new branch
$ git branch --> Should be on your shiny new welcome-controller branch

Do stuff to your app

$ rspec --> Run your set of tests to make sure you didn't break anything before committing changes
$ git status
$ git add .
$ git commit -m 'Created welcome controller with index and about views.'
$ git checkout master
$ git merge welcome-controller
$ rspec --> Now that you have merged with master, run your set of tests to make sure you didn't break anything before committing changes
$ git push
$ git branch -d welcome-controller --> Delete your local branch now that you've merged it into master