now available

now available
Want fresh tech tips in your inbox?

Git Feature Branch Naming Strategy

There are only two hard things in Computer Science: cache invalidation and naming things. -- Phil Karlton

Typically, we have three main branches at any given time in a project lifecycle.

master, development and staging.
Master is production ready code, development is actively being worked on and staging is pre-flight testing before deploying master.

Features are branched off of development and use underscores to indicate distance from originating branch. For instance

indicates that development_users_reset_password branched off of _development_users branch.
(3 underscores away) would indicate that I was experimenting with a branch off of development users reset password branch.

This provides a nice visual hierarchy when running git branch from the command line. It's also helpful when you have multiple features being worked on by several people and you want to know where these branches are in relation to each other without needing to ask anyone. Here is a more complex example that illustrates the usefulness in using underscores in naming feature branches

* development_people_importing_xml

Tagged w/ #branching #features #git #naming things #workflowgit

Apps I've Built

XPath Expression Editor
Practice and improve your XPath skills with XPath Editor
Click to buy on the App Store
Photo Location Changer
Easily change the location on your photos and videos
Click here for more info about the app
Photo Date Changer
Easily change the dates and times on your photos and videos
Click here for more info about the app
English dictionary with notifications so you won't forget what you're studying!
Click here for more info about the app
The app that quizzes and scores you on your vocabulary!
Click here for more info about the app