Skip to content

Commit 4b8ce23

Browse files
committed
content: finished git-internals, minor fixes to old content
1 parent 03e9fc5 commit 4b8ce23

File tree

4 files changed

+299
-17
lines changed

4 files changed

+299
-17
lines changed

src/content/lessons/advanced-git-features.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: 'Advanced git features'
33
description: 'Finding specific commits, using multiple working trees and submodules'
44
order: 9
5-
state: 'upcoming'
5+
state: 'covered'
66
tags: ['git']
77
links: {
88
'Referencing commits docs': 'https://git-scm.com/docs/gitrevisions',
@@ -32,6 +32,7 @@ B~1 # A (parent)
3232

3333
*parents* vs *ancestors*
3434
![history with merge](https://git-scm.com/book/en/v2/images/basic-merging-2.png)
35+
3536
```bash
3637
master^ # C4 -- first parent of a merge commit
3738
master^2 # C5 -- second parent of a merge commit
@@ -64,6 +65,7 @@ git log -g master
6465
---
6566

6667
This adds yet another way to reference commits:
68+
6769
```bash
6870
# which commit did master point to 3 moves ago
6971
master@{3}
@@ -101,6 +103,7 @@ by default git does **NOT** guarantee that commit author is who they say they ar
101103

102104
For projects that require extra security, each commit can be signed.
103105
This is possible by using git in conjunction with `gpg` and the `-S` flag:
106+
104107
```bash
105108
# create a signed commit using the configured pgp key
106109
git commit -S -m "you can be sure I made this commit"
@@ -127,6 +130,7 @@ Tags can be used to mark important milestones in a project's history (such as re
127130
---
128131

129132
Git supports 2 types of tags:
133+
130134
- **Lightweight** - very similar to a branch, but cannot be changed
131135

132136
- **Annotated** - similar to a signed commit, but holding additional tagging details
@@ -136,7 +140,7 @@ Git supports 2 types of tags:
136140
### Lightweight tags
137141

138142
The main difference between a Lightweight tag and a branch is that tags
139-
**CANNOT** be changed to point to a different commit.
143+
**CANNOT** be changed to point to a different commit.
140144

141145
```bash
142146
# tag the current commit as v2
@@ -181,6 +185,7 @@ git tag -d v1.75-tmp
181185
---
182186

183187
Tags are NOT shared by default, you have to push them explicitly:
188+
184189
```bash
185190
# push all tags to the origin remote
186191
git push origin --tags
@@ -230,11 +235,12 @@ You can use an appropriate command to automatically validate if the commit is go
230235
## Multiple work-trees
231236

232237
Git allows you to have multiple versions checked-out at the same time:
238+
233239
```bash
234240
# creates a branch called bugfix and checks it out
235241
# into a working directory called bugfix
236242
# in the parent of the current directory
237-
git workspace add ../bugfix
243+
git worktree add ../bugfix
238244

239245
# checkout branch origin/broken into a
240246
# separate working directory in your home directory
@@ -310,7 +316,6 @@ You can then push each line to its own remote (public and private).
310316

311317
---
312318

313-
314319
## Submodules
315320

316321
If you put a git repository inside another git repository,
@@ -339,4 +344,3 @@ git submodule add path/to/other/repo
339344
# clone a repository including all submodules
340345
git clone --recurse submodules
341346
```
342-

src/content/lessons/bash-scripting.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: 'Scripting with bash'
33
description: 'Diving deeper into bash features, writing scripts'
44
order: 8
5-
state: 'upcoming'
5+
state: 'covered'
66
tags: ['bash', 'unix']
77
links: {
88
'shellcheck': 'https://github.com/koalaman/shellcheck',

0 commit comments

Comments
 (0)