-
Notifications
You must be signed in to change notification settings - Fork 5
Git and GitHub
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.
-
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 tomaster
-
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.
- 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.
- 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.