... | ... | @@ -4,19 +4,21 @@ or maybe [A Simple Guide to Git](http://rogerdudler.github.io/git-guide/). |
|
|
|
|
|
These are some of the terms you'll need to know:
|
|
|
1) `pull`: fetch the most recent version of the code (after you `cloned` the repository).
|
|
|
2) `git add`: "stage" your changes for the commit.
|
|
|
2) `add`: "stage" your changes for the commit.
|
|
|
3) `commit`: group together changes to make them final (see [below](../wiki/Git-Workflow#commits)).
|
|
|
4) `push`: send your changes on the Github repo (the `origin`).
|
|
|
|
|
|
On a bigger scale, changes to the code can be made on different `branches`,
|
|
|
which are different versions of the same project that can be `merged` into each other.
|
|
|
|
|
|
5) `checkout`: change working branch.
|
|
|
6) `merge`: add all the changes in a branch to another branch (can produce `merge conflicts` when the same file has been modified in different ways: you have to resolve them in order to merge).
|
|
|
5) `checkout <name-of-branch>`: change working branch.
|
|
|
6) `merge <another-branch>`: import all the changes made in another branch (can produce `merge conflicts` when the same file has been modified in different ways: you have to resolve them in order to merge).
|
|
|
7) `pull request`: ask for your branch to be merged with the original branch (it's better if you add some `reviewers` to check that everything's ok before merging).
|
|
|
|
|
|
### Boardcore Branches
|
|
|
|
|
|
This branching model was inspired by <http://nvie.com/posts/a-successful-git-branching-model/>.
|
|
|
|
|
|
In Boardcore there are two main branches:
|
|
|
|
|
|
- The `master` branch: is the main branch, everything's that here has been tested and it's working (or at least it should).
|
... | ... | @@ -30,12 +32,10 @@ the rest of the code and then, only when everything's working, it can be merged |
|
|
|
|
|
To make changes to the software you should use:
|
|
|
|
|
|
- `development` branches: are branched off from `testing` and exist for a limited amount of time for developing a specific feature.
|
|
|
- `development` branches: are branched off from `testing` and exist for a limited amount of time for developing a specific feature (e.g. `somesensor-dev`).
|
|
|
- `hotfix` branches: when a bug is found on the master, a branch is created to find a fix to that bug.
|
|
|
When the problem is solved, the branch will be merged with the master *and* the testing branch before being cancelled.
|
|
|
|
|
|
If you want to see a nice branching model example take a look at <http://nvie.com/posts/a-successful-git-branching-model/>.
|
|
|
|
|
|
### Boardcore Workflow
|
|
|
|
|
|
- A new feature is required (e.g. a barometer driver)
|
... | ... | @@ -76,7 +76,7 @@ Some simple rules: |
|
|
|
|
|
The page contains the description of our workflow with git, in particular:
|
|
|
- Basics(pull, add, commit, push)
|
|
|
- Branching(master, development, features and hotfixes)
|
|
|
- Branching(master, testing, development and hotfixes)
|
|
|
- Commits(how to write commit messages and when to commit)
|
|
|
```
|
|
|
Do this, and everyone will love you - including yourself, when you'll read
|
... | ... | |