Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
courses
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
R3
school
courses
Commits
43ff6156
Commit
43ff6156
authored
6 years ago
by
Laurent Heirendt
Browse files
Options
Downloads
Patches
Plain Diff
minor changes to slides
parent
1dfd2cf4
No related branches found
No related tags found
1 merge request
!37
Regular merge of develop
Pipeline
#8473
passed
6 years ago
Stage: deploy
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
slides/essential_commands.md
+21
-23
21 additions, 23 deletions
slides/essential_commands.md
slides/homework.md
+3
-10
3 additions, 10 deletions
slides/homework.md
slides/syncFork.md
+1
-6
1 addition, 6 deletions
slides/syncFork.md
with
25 additions
and
39 deletions
slides/essential_commands.md
+
21
−
23
View file @
43ff6156
...
@@ -39,7 +39,7 @@ Modify and rename `addTwoNumbers.m` in the folder `src/firstCommit` as `addTwoNu
...
@@ -39,7 +39,7 @@ Modify and rename `addTwoNumbers.m` in the folder `src/firstCommit` as `addTwoNu
```
bash
```
bash
$
cd
src/firstCommit
$
cd
src/firstCommit
$
mv
addTwoNumbers.m addTwoNumbers_myName
.m
$
git
mv
addTwoNumbers
_myName
.m addTwoNumbers_
laurent.m
# replace
myName
```
```
<br>
<br>
...
@@ -60,20 +60,21 @@ $ git status
...
@@ -60,20 +60,21 @@ $ git status
<div
class=
"fragment"
>
<div
class=
"fragment"
>
<br>
<br>
Now, add the file (bring it on stage)
**ADVANCED**
: see your changes in the terminal
```
bash
```
bash
$
git add addTwoNumbers_myName.m
$
git diff
$
git status
# returns the same as before, generally in green (means staged)
```
```
exit with
`q`
<div
class=
"fragment"
>
<div
class=
"fragment"
>
<br>
<br>
**ADVANCED**
: see your changes in the terminal
Now, add the file (bring it on stage)
```
bash
```
bash
$
git diff
$
git add addTwoNumbers_laurent.m
# replace myName
$
git status
# returns the same as before, generally in green (means staged)
```
```
exit with
`q`
## Add a commit message
## Add a commit message
...
@@ -101,21 +102,18 @@ exit by typing `q`
...
@@ -101,21 +102,18 @@ exit by typing `q`
## Do it yourself
## Do it yourself
*
Modify and rename
`secondCommit/multiplyTwoNumbers_myName.m`
*
*Exercice 1:**
*
Push the file
`secondCommit/multiplyTwoNumbers_myName.m`
*
Don't forget to edit
<font
color=
"red"
>
`_myName`
</font>
*
Edit the test in
`test/suite`
<div
class=
"fragment"
>
<div
class=
"fragment"
>
<br>
<br>
Commands:
<img
src=
"img/icon-live-demo.png"
height=
"100px"
>
```
bash
$
git checkout develop
<div
class=
"fragment"
>
$
git pull origin develop
**Exercice 2:**
$
git checkout
-b
multiply-2-numbers
# make changes to file
*
Checkout a new branch named
`multiply-2-numbers`
$
git add secondCommit/multiplyTwoNumbers_myName.m
*
Rename and modify
`src/secondCommit/multiplyTwoNumbers_myName.m`
$
git commit
-m
"Corrected formula for multiplying 2 numbers"
*
Push the file
`src/secondCommit/multiplyTwoNumbers_myName.m`
$
git status
*
Don't forget to edit
<font
color=
"red"
>
`_myName`
</font>
$
git push origin multiply-2-numbers
\ No newline at end of file
$
git log
# optional
```
This diff is collapsed.
Click to expand it.
slides/homework.md
+
3
−
10
View file @
43ff6156
## Homework
on GitLab
## Homework
This exercise has to be done on your lab
computer on which
`Matlab`
or
`octave`
**are**
installed.
Ideally, do this exercise on a
computer on which
`Matlab`
or
`octave`
**are**
installed.
<div
class=
"fragment"
>
<div
class=
"fragment"
>
<br>
<br>
More information on how install these software are on
[
mathworks.com
](
www.mathworks.com]
)
and
on
[
gnu.org/software/octave
](
gnu.org/software/octave
)
More information on how install these software are on
[
mathworks.com
](
www.mathworks.com]
)
or
on
[
gnu.org/software/octave
](
gnu.org/software/octave
)
<div
class=
"fragment"
>
<div
class=
"fragment"
>
<br>
<br>
Don't forget to properly configure
`git`
with your username and email as explained in the training slides.
Don't forget to properly configure
`git`
with your username and email as explained in the training slides.
## Task
-
create a fork of the repository
<br>
https://git-r3lab.uni.lu/R3school/git.practice
-
commit some code
-
create a merge request on
`GitLab`
.
## Detailed instructions
## Detailed instructions
-
First, fork the
[
https://git-r3lab.uni.lu/R3school/git.practice
](
https://git-r3lab.uni.lu/R3school/git.practice
)
repository.
-
First, fork the
[
https://git-r3lab.uni.lu/R3school/git.practice
](
https://git-r3lab.uni.lu/R3school/git.practice
)
repository.
...
...
This diff is collapsed.
Click to expand it.
slides/syncFork.md
+
1
−
6
View file @
43ff6156
...
@@ -37,11 +37,6 @@ $ git push origin master
...
@@ -37,11 +37,6 @@ $ git push origin master
```
```
<div
class=
"fragment"
>
<div
class=
"fragment"
>
<br>
Do the same for the
`develop`
branch.
Do the same for the
`develop`
branch
<br>
(replace
`master`
with
`develop`
).
## Time to practice!
<img
src=
"img/icon-live-demo.png"
height=
"100px"
>
<img
src=
"img/icon-live-demo.png"
height=
"100px"
>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment