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
83685992
Commit
83685992
authored
6 years ago
by
Laurent Heirendt
Browse files
Options
Downloads
Patches
Plain Diff
minor changes to slides
parent
3ae54a0d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
essential_commands.md
+21
-23
21 additions, 23 deletions
essential_commands.md
homework.md
+3
-10
3 additions, 10 deletions
homework.md
syncFork.md
+1
-6
1 addition, 6 deletions
syncFork.md
with
25 additions
and
39 deletions
essential_commands.md
+
21
−
23
View file @
83685992
...
...
@@ -39,7 +39,7 @@ Modify and rename `addTwoNumbers.m` in the folder `src/firstCommit` as `addTwoNu
```
bash
$
cd
src/firstCommit
$
mv
addTwoNumbers.m addTwoNumbers_myName
.m
$
git
mv
addTwoNumbers
_myName
.m addTwoNumbers_
laurent.m
# replace
myName
```
<br>
...
...
@@ -60,20 +60,21 @@ $ git status
<div
class=
"fragment"
>
<br>
Now, add the file (bring it on stage)
**ADVANCED**
: see your changes in the terminal
```
bash
$
git add addTwoNumbers_myName.m
$
git status
# returns the same as before, generally in green (means staged)
$
git diff
```
exit with
`q`
<div
class=
"fragment"
>
<br>
**ADVANCED**
: see your changes in the terminal
Now, add the file (bring it on stage)
```
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
...
...
@@ -101,21 +102,18 @@ exit by typing `q`
## Do it yourself
*
Modify and rename
`secondCommit/multiplyTwoNumbers_myName.m`
*
Push the file
`secondCommit/multiplyTwoNumbers_myName.m`
*
Don't forget to edit
<font
color=
"red"
>
`_myName`
</font>
*
*Exercice 1:**
*
Edit the test in
`test/suite`
<div
class=
"fragment"
>
<br>
Commands:
```
bash
$
git checkout develop
$
git pull origin develop
$
git checkout
-b
multiply-2-numbers
# make changes to file
$
git add secondCommit/multiplyTwoNumbers_myName.m
$
git commit
-m
"Corrected formula for multiplying 2 numbers"
$
git status
$
git push origin multiply-2-numbers
$
git log
# optional
```
<img
src=
"img/icon-live-demo.png"
height=
"100px"
>
<div
class=
"fragment"
>
**Exercice 2:**
*
Checkout a new branch named
`multiply-2-numbers`
*
Rename and modify
`src/secondCommit/multiplyTwoNumbers_myName.m`
*
Push the file
`src/secondCommit/multiplyTwoNumbers_myName.m`
*
Don't forget to edit
<font
color=
"red"
>
`_myName`
</font>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
homework.md
+
3
−
10
View file @
83685992
## 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"
>
<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"
>
<br>
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
-
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.
syncFork.md
+
1
−
6
View file @
83685992
...
...
@@ -37,11 +37,6 @@ $ git push origin master
```
<div
class=
"fragment"
>
<br>
Do the same for the
`develop`
branch
<br>
(replace
`master`
with
`develop`
).
## Time to practice!
Do the same for the
`develop`
branch.
<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