Skip to content

Commit

Permalink
Merge pull request #5 from manuGil/review
Browse files Browse the repository at this point in the history
Formatting
  • Loading branch information
manuGil authored Aug 8, 2024
2 parents 68013d5 + fb171b3 commit c481af6
Show file tree
Hide file tree
Showing 19 changed files with 370 additions and 173 deletions.
18 changes: 9 additions & 9 deletions gitcodev/exercises/L1-ex01.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@

### Lesson 1 Episode 2 --- Tracking changes with the index
# Lesson 1 Episode 2 --- Tracking changes with the index
Please perform the following tasks alone

The current file `lines.txt` contains three lines

1. Revise in your terminal the commands we have used so far
1. Append to the file a fourth line (in the same style as the previous lines)
2. Check the new content of the file using...
3. Check whether Git realises that a change has occurred using...
4. Check which difference Git finds in the file using...
1. Check the new content of the file using...
1. Check whether Git realises that a change has occurred using...
1. Check which difference Git finds in the file using...
Take note of the output of the Git commands

2. Follow the action that Git suggests next by using...
1. Same as 1b
2. Same as 1c
3. Same as 1d
1. Same as 1.2
1. Same as 1.3
1. Same as 1.4

Take note of how the outputs of Git commands have changed

Formulate your own explanation of what you have observed
The following questions are two sides of the same coin:
What did you ask Git to do?
What did Git do for you?
* **What did you ask Git to do?**
* **What did Git do for you?**
27 changes: 14 additions & 13 deletions gitcodev/exercises/L1-ex02.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
# Lesson 1 Episode 2 --- Stop tracking changes in a file
Please perform the following tasks individually

Lesson 1 Episode 2 --- Stop tracking changes in a file
Please perform the following tasks individually
1. Revise the commands we have used since the last exercise. Could you use a shell command for this?
1. Ask Git for the current state of the repository using...
1. Stop tracking the file directory/emptyfile.txt

````{caution}
Be mindful of not deleting the file!
````
1. Verify the result of your action using...

1. Revise the commands we have used since the last exercise.
Could you use a shell command for this?
2. Ask Git for the current state of the repository using...
3. Stop tracking the file directory/emptyfile.txt
CAUTION Be mindful of not deleting the file!
4. Verify the result of your action using...

Formulate your own explanation of what you have observed
The following questions are two sides of the same coin:
What did you ask Git to do?
What did Git do for you?
Formulate your own explanation of what you have observed
The following questions are two sides of the same coin:
* **What did you ask Git to do?**
* **What did Git do for you?**
19 changes: 9 additions & 10 deletions gitcodev/exercises/L1-ex03.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@

Lesson 1 Episode 2 --- Renaming tracked files
Please perform the following tasks individually
1. Revise the commands we have used since the last exercise.
Could you use a shell command for this?
2. Ask Git for the current state of the repository using...
3. Rename the file lines.txt as Lines.txt using...
4. Verify that the working tree contains Lines.txt using...
5. Verify that Git tracks Lines.txt using...
# Lesson 1 Episode 2 --- Renaming tracked files
Please perform the following tasks individually

1. Revise the commands we have used since the last exercise.
Could you use a shell command for this?
2. Ask Git for the current state of the repository using...
3. Rename the file lines.txt as Lines.txt using...
4. Verify that the working tree contains Lines.txt using...
5. Verify that Git tracks Lines.txt using...
12 changes: 7 additions & 5 deletions gitcodev/exercises/L1-ex04.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@

Lesson 1 Episode 3 --- Commit changes in a tracked file
Please perform the following tasks individually
# Lesson 1 Episode 3 --- Commit changes in a tracked file
Please perform the following tasks individually

Check if .gitignore is ready to be committed using...
Commit .gitignore using...
Check if `.gitignore` is ready to be committed using...
Commit `.gitignore` using...

DO NOT forget the commit message describing your action
````{attention}
DO NOT forget the commit message describing your action
````
39 changes: 19 additions & 20 deletions gitcodev/exercises/L1-ex05.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,25 @@
# Lesson 1 Episode 3 --- Follow the state of the repository in the commit routine

Lesson 1 Episode 3 --- Follow the state of the repository in the commit routine
Please perform the following tasks individually.

Please perform the following tasks individually
1. The baseline
1. Revise the commands launched since the last exercise using...
1. Check the output of `git status`

The baseline
1a. Revise the commands launched since the last exercise using...
1b. Check the output of `git status`
2. The working tree
1. Append the fifth line to `Lines.txt` using...
1. Repeat 1.2 and compare its output with the previous

The working tree
2a. Append the fifth line to Lines.txt using...
2b. Repeat 1b and compare its output with the previous
3. The index
1. Stage the changes of `Lines.txt` in the index using...
1. Repeat 1.2 and compare its output with the previous ones

The index
3a. Stage the changes of Lines.txt in the index using...
3b. Repeat 1b and compare its output with the previous ones
4. The history
1. Store the changes of `Lines.txt` in the history using...
1. Repeat 1.2 and compare its output with the previous ones
1. Look up and parse the commit history using...

The history
4a. Store the changes of Lines.txt in the history using...
4b. Repeat 1b and compare its output with the previous ones
5. Look up and parse the commit history using...

Formulate your own explanation of what git status showed you
The following questions are two sides of the same coin:
What did you ask Git to do?
What did Git do for you?
Formulate your own explanation of what git status showed you
The following questions are two sides of the same coin:
* **What did you ask Git to do?**
* **What did Git do for you?**
41 changes: 19 additions & 22 deletions gitcodev/exercises/L1-ex06.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,22 @@

Lesson 1 Episode 3 --- Follow the state of the index in the commit routine
Please perform the following tasks individually
# Lesson 1 Episode 3 --- Follow the state of the index in the commit routine
Please perform the following tasks individually

The baseline
1a. Revise the commands launched since the last exercise using...
1b. Check the output of `git diff`
1. The baseline
1. Revise the commands launched since the last exercise using...
1. Check the output of `git diff`
2. The working tree
1. Append the sixth line to `Lines.txt` using...
1. Repeat 1.2 and compare its output with the previous
3. The index
1. Stage the changes of `Lines.txt` in the index using...
1. Repeat 1.2 and compare its output with the previous ones
4. The history
1. Store the changes of `Lines.txt` in the history using...
1. Repeat 1.2 and compare its output with the previous ones
1. Look up and parse the commit history using...

The working tree
2a. Append the sixth line to Lines.txt using...
2b. Repeat 1b and compare its output with the previous

The index
3a. Stage the changes of Lines.txt in the index using...
3b. Repeat 1b and compare its output with the previous ones

The history
4a. Store the changes of Lines.txt in the history using...
4b. Repeat 1b and compare its output with the previous ones
5. Look up and parse the commit history using...

Formulate your own explanation of what `git diff` showed you
The following questions are two sides of the same coin:
What did you ask Git to do?
What did Git do for you?
Formulate your own explanation of what `git diff` showed you
The following questions are two sides of the same coin:
* **What did you ask Git to do?**
* **What did Git do for you?**
34 changes: 18 additions & 16 deletions gitcodev/exercises/L1-ex07.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@

Lesson 1 Episode 3 --- Explore the changes recorded in the history
Please perform the following tasks individually
# Lesson 1 Episode 3 --- Explore the changes recorded in the history
Please perform the following tasks individually

The baseline
1a. Revise the commands launched since the last exercise using...
1. The baseline
1. Revise the commands launched since the last exercise using...

Perform the commit routine
2a. Append the seventh line to Lines.txt using...
2b. Stage the changes of Lines.txt in the index using...
2c. Store the changes of Lines.txt in the history using...
2. Perform the commit routine
1. Append the seventh line to `Lines.txt` using...
1. Stage the changes of `Lines.txt` in the index using...
1. Store the changes of `Lines.txt` in the history using...

As many times as you like
3a. Check the history using...
3b. Compare different versions of Lines.txt using...
3. As many times as you like
1. Check the history using...
1. Compare different versions of `Lines.txt` using...

Formulate your own explanation of what you have observed
The following questions are two sides of the same coin:
What did you ask Git to do?
What did Git do for you?
Are there shortcuts to do the same with less typing?
Formulate your own explanation of what you have observed
The following questions are two sides of the same coin:
* **What did you ask Git to do?**
* **What did Git do for you?**

````{attention}
Are there shortcuts to do the same with less typing?
````
26 changes: 13 additions & 13 deletions gitcodev/exercises/L1-ex08.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@

Lesson 1 Episode 3 --- Explore the changes recorded in the history
Please perform the following tasks individually
# Lesson 1 Episode 3 --- Explore the changes recorded in the history
Please perform the following tasks individually

The baseline
1a. Check that the history has 5 commits
1b. Check that the file has 7 lines
1. The baseline
1. Check that the history has 5 commits
1. Check that the file has 7 lines

The action
Explain to yourself the difference **between** the outputs of
these two commands:
2. The action.
1. Explain to yourself the difference **between** the outputs of
these two commands:

git diff HEAD~3 HEAD~4 Lines.txt

git diff HEAD~3 HEAD~4

What is the reason of the (lack of) difference between the outputs?
```shell
git diff HEAD~3 HEAD~4 Lines.txt
git diff HEAD~3 HEAD~4
```
**What is the reason of the (lack of) difference between the outputs?**
22 changes: 11 additions & 11 deletions gitcodev/exercises/L1-ex09.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@

Lesson 1 Episode 3 --- Add lightweight tags to the history
Please perform the following tasks individually
# Lesson 1 Episode 3 --- Add lightweight tags to the history
Please perform the following tasks individually

Two commits come from exercises (as opposed to instructor-led typing)
1. Find out which commits they where
2. Tag them as exercises using...
Use capital letters for the tag name (for our convenience)
3. Verify the outcome of tagging with two Git commands, namely ... and ...
Two commits come from exercises (as opposed to instructor-led typing)
1. Find out which commits they where
2. Tag them as exercises using...
Use capital letters for the tag name (for our convenience)
3. Verify the outcome of tagging with two Git commands, namely ... and ...

Formulate your own explanation of what you have observed
Formulate your own explanation of what you have observed

The following questions are two sides of the same coin:
What did you ask Git to do?
What did Git do for you?
The following questions are two sides of the same coin:
* **What did you ask Git to do?**
* **What did Git do for you?**
38 changes: 21 additions & 17 deletions gitcodev/exercises/L1-ex10.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,25 @@

Lesson 1 Episode 3 --- Load committed versions in the working tree
Please perform the following tasks individually
# Lesson 1 Episode 3 --- Load committed versions in the working tree
Please perform the following tasks individually

Modify the file in the working tree at your pleasure recalling the
versions in the history.
The Git commands below may help you there (their order is just alphabetical)
git diff HEAD~m Lines.txt
git log --oneline
git restore --sources HEAD~n Lines.txt
where m and n are integers of your liking, including 0
1. Modify the file in the working tree at your pleasure recalling the versions in the history. The Git commands below may help you there (their order is just alphabetical)
```shell
git diff HEAD~m Lines.txt
git log --oneline
git restore --sources HEAD~n Lines.txt
```
where $m$ and $n$ are integers of your liking, including $0$

REQUIRED for the continuation (but not as a rule)
1. NEVER STAGE OR COMMIT
2. Make sure that you finish with a clean working tree at HEAD
````{attention}
REQUIRED for the continuation (but not as a rule)
1. NEVER STAGE OR COMMIT
2. Make sure that you finish with a clean working tree at HEAD
````
Formulate your own explanation of what you have observed
The following questions are two sides of the same coin:
* **What did you ask Git to do?**
* **What did Git do for you?**

Formulate your own explanation of what you have observed
The following questions are two sides of the same coin:
What did you ask Git to do?
What did Git do for you?
Are there shortcuts to do the same with less typing?
````{attention}
Are there shortcuts to do the same with less typing?
````
8 changes: 4 additions & 4 deletions gitcodev/exercises/L2-ex01.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#### Lesson 2 Episode 1 --- get familiar with branches
# Lesson 2 Episode 1 --- get familiar with branches
Please perform the following tasks individually

1. Revise the commands we have used so far
Expand All @@ -17,6 +17,6 @@ At the end:
6. Return to the branch `main`
7. Delete all other branches, using...

Formulate your explanation of what you have observed. The following questions are two sides of the same coin:
* **What did you ask Git to do?**
* **What did Git do for you?**
Formulate your explanation of what you have observed. The following questions are two sides of the same coin:
* **What did you ask Git to do?**
* **What did Git do for you?**
2 changes: 1 addition & 1 deletion gitcodev/exercises/L2-ex02.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#### Lesson 2 Episode 1 --- explore differences across branches
# Lesson 2 Episode 1 --- explore differences across branches
Please perform the following tasks individually

1. Move to branch B2
Expand Down
2 changes: 1 addition & 1 deletion gitcodev/exercises/L2-ex03.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#### Lesson 2 Episode 1 --- commit in a secondary branch
# Lesson 2 Episode 1 --- commit in a secondary branch
Please perform the following tasks individually

1. Stay in (or go to) branch B2 (the file Lines.txt contains eight lines)
Expand Down
2 changes: 1 addition & 1 deletion gitcodev/exercises/L2-ex04.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

#### Lesson 2 Episode 1 --- a first type of merge
# Lesson 2 Episode 1 --- a first type of merge
Please perform the following tasks individually

How many more lines has `Lines.txt` in B1 than in main?
Expand Down
2 changes: 1 addition & 1 deletion gitcodev/exercises/L2-ex05.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

#### Lesson 2 Episode 1 --- another type of merge
# Lesson 2 Episode 1 --- another type of merge
Please perform the following tasks individually

Please merge B2 in main
Expand Down
2 changes: 1 addition & 1 deletion gitcodev/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ h3.dancing {
</style>


# Introduction
# Foreword

This website describes a curriculum for a short course on *Version Control and collaboratie Development for Research Software*.
The content has been designed specifically for the instructors ('train the trainers') and not for the learners. A derivative document suited to learners would require adapted design, format and distribution.
Expand Down
Loading

0 comments on commit c481af6

Please sign in to comment.