generated from manuGil/fair-code
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from manuGil/review
Formatting
- Loading branch information
Showing
19 changed files
with
370 additions
and
173 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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?** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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?** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
```` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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?** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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?** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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? | ||
```` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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?** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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?** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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? | ||
```` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.