If git is not furnished by your OS, you can download from [the official git website](https://git-scm.com/downloads).
If git is not supplied by your OS, you can download it from [the official git website](https://git-scm.com/downloads).
## Configure git
## Configure git
Before starting to use git, you have to configure a few variables to specify your name, email, and your editors.
Before starting to use git, you have to configure a few variables to specify your name, email, and editors.
```
```
git config --global user.name "Jon Doe"
git config --global user.name "Jon Doe"
...
@@ -67,7 +67,7 @@ git add -p file3.cpp
...
@@ -67,7 +67,7 @@ git add -p file3.cpp
```
```
To see the current status, use :
To see the current status, use :
- `git status` to list the files that will be included in the next commit
- `git status` to list the files that will be included in the next commit
- `git diff --cached` to list the modification that will be included
- `git diff --cached` to list the modifications that will be included
- `git diff` to list the modifications that won't be included.
- `git diff` to list the modifications that won't be included.
Once a coherent set of modifications is in the index, the actual commit can be performed.
Once a coherent set of modifications is in the index, the actual commit can be performed.
...
@@ -117,7 +117,7 @@ If conflicts occur during a rebase or a merge, git will stop and you will have t
...
@@ -117,7 +117,7 @@ If conflicts occur during a rebase or a merge, git will stop and you will have t
## Accept a merge request
## Accept a merge request
First check that the commits in the branch do not break the testcases (the gitlab server should put a green icon beside the commit and on the page of the merge request) and that the code looks good.
First check that the commits in the branch do not break the testcases (the gitlab server should put a green icon beside the commit and on the page of the merge request) and that the code looks good.
If it's not the case, you can discuss the modifications on the page of the merge request on gitlab and ask for changes. Once, the branch is satisfactory merge it into master.
If it's not the case, you can discuss the modifications on the page of the merge request on gitlab and ask for changes. Once the branch is satisfactory, merge it into master.