Skip to content
Dominik Wilkowski edited this page Jan 5, 2015 · 2 revisions

An introduction to working with git and GitHub for CX Devs

Configuring and using GitHub on CX projects

Before you start working with Git on your project, it's important that you understand the way the CX works with GitHub. Git Branching is a fantastic introduction to GitHub Branching.

Note: Use git-flow to make it easier to follow these rules.

Your project should then take the following git structure:

Branching

  • master = This is your release branch, code is merged from all other branches into this one. Each release is tagged (more on this below). Never commit directly to master

  • dev = As the name says this is a development branch, whilst the project is in-flight for a particular piece this is where all of the merging should be done for testing. All features and fixes come together here to be tested on all devices.

  • Feature branches = Merge these branches only into dev. Provide a descriptive name and push it up stream. Checkout the relevant feature branches for fixes to them.

Committing & pushing

  • All of your commit messages need to be descriptive.
  • Push as much and as sensible as possible.
  • Make sure you are aware of what other people might work on to prevent merge issues.

Tagging

  • It's good practise to use tags. We require all releases to be prefixed with a "v" eg "v1.0.9". Once the branch has been tagged you can release it saving a snapshot of it in the commit history. Tags will make it easier for you to see diffs between releases and return to specific versions.
  • Tags should only be based on master states.