Marie Kondo your code- how to use git branches for the organized code base you always wanted

Stephen Jensen
Code Mochi
Published in
2 min readMay 20, 2019
Good code organization requires using staging and feature branches to ensure that the production-ready code is always good to go.

In this video blog I’ll go over why we use git to manage our projects and why committing all your code to a master branch is absolute insanity and something you should never do. Instead, you should create feature branches- they allow you to create discrete chunks of code that you add to your staging branch one feature at a time until you have a version that you are ready to deploy to master.

You’ll see how this allows us to always have a production branch that is ready to go, a staging branch that has all the latest features but isn’t quite ready for prime time, and a feature branch that we can develop and break as much as we want without impacting anyone else.

Git Branches for Well Ordered Code- #1 Overview

Git Branches for Well Ordered Code- #2 Code Demo

Download the Git Cheatsheet

You can snag a cheatsheet that shows a step-by-step guide of how to use Github and Gitkraken for setting up your project, creating and merging feature branches and finally pushing out your production releases. Check it out at Code Mochi.

There is more where that came from!
Click here to give us your email and we’ll let you know when we publish new stuff. We respect your email privacy, we will never spam you and you can unsubscribe anytime.

Originally published at https://www.codemochi.com.

--

--

Stephen Jensen
Code Mochi

Full Stack Developer, Ph.D. Surface Scientist, Lead Instructor at Pocket Scholar