... | ... | @@ -2,22 +2,24 @@ |
|
|
If you are completely new to Git and Github, start from reading the [Git Basics](https://git-scm.com/book/en/v2/Getting-Started-Git-Basics)
|
|
|
or maybe [A Simple Guide to Git](http://rogerdudler.github.io/git-guide/).
|
|
|
|
|
|
There are some of the terms you'll need to know are:
|
|
|
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.
|
|
|
3) `commit`: group together changes to make them final (see [below](../wiki/Git-Workflow#commits)).
|
|
|
4) `push`: send your changes upstream.
|
|
|
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).
|
|
|
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).
|
|
|
|
|
|
### Branching
|
|
|
|
|
|
In Boardcore there are two main branches:
|
|
|
|
|
|
- The `master` branch: is main branch, everything's that here has been tested and it's all working (or at least it should).
|
|
|
- The `master` branch: is the main branch, everything's that here has been tested and it's working (or at least it should).
|
|
|
- The `development` branch: is where development takes places. When a new feature is ready, it has to work with
|
|
|
the rest of the code and then, only when everything's working, it can be merged with the master.
|
|
|
|
... | ... | @@ -29,7 +31,7 @@ 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:
|
|
|
|
|
|
- `feature` branches: are branched off from `development` and exist for a limited amount of time for developing a specific feature.
|
|
|
When the feature is ready, the developer should open a *Pull Request* to merge the feature branch with the developing branch.
|
|
|
When the feature is ready, the developer should open a *Pull Request* to merge the feature branch back to the developing branch.
|
|
|
- `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 development branch before being cancelled.
|
|
|
|
... | ... | |