Skip to content
Snippets Groups Projects
Commit cfe9f057 authored by Laurent Heirendt's avatar Laurent Heirendt :airplane:
Browse files

Changes to branches and other slides

parent 8437a52b
No related branches found
No related tags found
No related merge requests found
...@@ -49,14 +49,11 @@ Only difference: you are on your own branch. ...@@ -49,14 +49,11 @@ Only difference: you are on your own branch.
## Merge a branch ## Merge a branch
If you want your feature on the `develop` or `master` branches, merge your branch with the If you want your feature on the `develop` or `master` branches, merge!
`develop` or `master` or branch:
<br> <br>
**submit a MR or a PR** via the Github/Gitlab interface. **submit a MR or a PR** via the Github/Gitlab interface.
<!-- PICTURES HERE //-->
<div class="fragment"> <div class="fragment">
<br> <br>
**ADVANCED**: You can see the differences between branches **ADVANCED**: You can see the differences between branches
...@@ -66,3 +63,26 @@ $ git diff master..matrix_vect_mult_myName ...@@ -66,3 +63,26 @@ $ git diff master..matrix_vect_mult_myName
<br> <br>
You can delete the branch via the interface. You can delete the branch via the interface.
## Gitlab interface
Detailed information is [docs.gitlab.com/ee/gitlab-basics/add-merge-request.html](https://docs.gitlab.com/ee/gitlab-basics/add-merge-request.html).
1. Click on **New merge request**
![alt text](https://docs.gitlab.com/ee/gitlab-basics/img/merge_request_new.png "New Merge Request")
<br><br>
2. Compare the branches
![alt text](https://docs.gitlab.com/ee/gitlab-basics/img/merge_request_select_branch.png "Compare branches")
<ol start="3">
<li>Submit the MR
![alt text](https://docs.gitlab.com/ee/gitlab-basics/img/merge_request_page.png "Submit MR")/li>
</ol>
## Github interface
## Good practices ## Good practices
1. `clone` a repository, do not download the `.zip` file. * `clone` a repository, do not download the `.zip` file.
2. `pull` before `push` * `pull` before `push`
3. Work on your **own** branch (in your own fork) * Work on your **own** branch (in your own fork)
4. Do **not** `push` to `master` or `develop` (submit PR) * Do **not** `push` to `master` or `develop` (submit PR)
5. Do **not** combine `git` commands * Do **not** combine `git` commands
```sh ```sh
$ git commit -am "myMessage" # do not do this $ git commit -am "myMessage" # do not do this
``` ```
6. Stage only 1 file at once using * Stage only 1 file at once using
```sh ```sh
$ git add myFile.txt $ git add myFile.txt
``` ```
7. Commit only a few files at once
8. Submit a PR instead of pushing directly
9. Always sync your fork before starting to work * Commit only a few files at once
* Submit a PR instead of pushing directly
* Always sync your fork before starting to work
```sh ```sh
$ git remote -v # verify to have the right remote set $ git remote -v # verify to have the right remote set
$ git fetch upstream $ git fetch upstream
$ git merge upstream/master $ git merge upstream/master
$ git push origin master # do not do git push (!) $ git push origin master # do not do git push (!)
``` ```
10. `Push` often - avoid conflicts * `Push` often - avoid conflicts
<br><br> <br><br>
**A `push` a day keeps the conflict away** **A `push` a day keeps the conflict away**
## Installation ## Installation
<img src="img/github_app.png" class="as-is" height="300" /> <img src="img/github_app.png" class="as-is" height="200" />
**Linux (Ubuntu)** **Linux (Ubuntu)**
......
...@@ -19,7 +19,6 @@ in your home directory, denoted as `~/`. ...@@ -19,7 +19,6 @@ in your home directory, denoted as `~/`.
## Essential Linux commands ## Essential Linux commands
<div class="fragment">
List the contents of a directory List the contents of a directory
```sh ```sh
$ ls $ ls
...@@ -40,7 +39,7 @@ $ cd .. ...@@ -40,7 +39,7 @@ $ cd ..
$ cd ../.. $ cd ../..
``` ```
<div class="fragment">
<br> <br>
Create a directory Create a directory
```sh ```sh
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment