Skip to content

Commit 3a5c07b

Browse files
committed
docs: Reformat
1 parent 0cf6d38 commit 3a5c07b

17 files changed

+176
-126
lines changed

.github/workflows/docs.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,18 @@ jobs:
1313
- name: Build book
1414
run: |-
1515
npm install -g md-to-pdf
16-
mkdir -p output
16+
mkdir -p _output
1717
cd docs
1818
echo; echo "Input Folder Listing"
1919
ls
2020
echo; echo "Generating PDF"
21-
for f in *.md; do cat $f; echo; done | md-to-pdf --stylesheet "../theme/style.css" > ../output/blue-paper.pdf
22-
cd ../output
21+
for f in *.md; do cat $f; echo; done | md-to-pdf --stylesheet "../theme/style.css" > ../_output/blue-paper.pdf
22+
cd ../_output
2323
echo; echo "Output Folder Listing"
2424
ls
2525
cd ..
2626
2727
- uses: actions/upload-artifact@v1
2828
with:
2929
name: output
30-
path: output
30+
path: _output

docs/01-what-is-version-control.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,9 @@
1-
2-
31
# What is version Control
42

53
## The Past
64

7-
85
## The Present
96

10-
117
## Types of Version Control System
128

13-
14-
159
## Distributed Version Control
16-
17-

docs/02-getting-ready.md

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,21 @@
33
Before you start using Git you will need some software to be installed.
44

55
For Windows users the combination is one of:
6+
67
- Microsoft Terminal and Git-SCM, or
78
- Microsoft Terminal and Laragon
89

910
For MacOS users then either:
11+
1012
- iTerm2 & Git, or
1113
- Warp & Git
1214

1315
Mac users are able to install Git via the Git-SCM installer or via homebrew.
1416

1517
For Linux users:
18+
1619
- Git
17-
Linux users should find git installed, if not use the package manager appropriate for your version of Linux.
20+
Linux users should find git installed, if not use the package manager appropriate for your version of Linux.
1821

1922
## Windows Installations
2023

@@ -49,19 +52,20 @@ This places Laragon in the folder `c:\Laragon`.
4952
CLI stands for Command Line Interpreter.
5053

5154
There are many of them including:
55+
5256
- Windows Command Prompt
5357
- Microsoft PowerShell
54-
- bash
58+
- bash
5559
- zshell
5660
- and many more
5761

5862
## Parts of the Prompt
5963

60-
| Image | Description |
61-
|----------------------------------------------------| ---- |
62-
| ![](../assets/pasted-image-20240216111739.png) | This is the user account, followed by the computer name and separated by an `@`<br><br>Literally: *User **at** Computer*<br> |
63-
| ![](../assets/pasted-image-20240216111840.png) | Tells us that we are running in MinGW 64 bit<br> |
64-
| ![](../assets/pasted-image-20240216111909.png) | Shows we are in the `~/Source/Repos` folder, where `~` is the user's (your) home folder.<br><br>In Windows terms, this is the same as:<br><br> `C:\Users\UserName\Source\Repos`<br> |
64+
| Image | Description |
65+
|------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
66+
| ![](../assets/pasted-image-20240216111739.png) | This is the user account, followed by the computer name and separated by an `@`<br><br>Literally: *User **at** Computer*<br> |
67+
| ![](../assets/pasted-image-20240216111840.png) | Tells us that we are running in MinGW 64 bit<br> |
68+
| ![](../assets/pasted-image-20240216111909.png) | Shows we are in the `~/Source/Repos` folder, where `~` is the user's (your) home folder.<br><br>In Windows terms, this is the same as:<br><br> `C:\Users\UserName\Source\Repos`<br> |
6569

6670
## Setting up Microsoft Terminal to use Git Bash as a CLI
6771

@@ -97,7 +101,9 @@ Then click the *Browse* button...
97101

98102
![](../assets/pasted-image-20240216104105.png)
99103

100-
At home, if you have installed using Git-SCM installer then the default location for Git is: `c:\program files\git`. If you have Laragon installed using the default installation location, then you should find Git in the `C:\Laragon\bin\git` folder.
104+
At home, if you have installed using Git-SCM installer then the default location for Git is: `c:\program files\git`. If
105+
you have Laragon installed using the default installation location, then you should find Git in the `C:\Laragon\bin\git`
106+
folder.
101107

102108
> At TAFE, we have a different location, `c:\ProgramData\git` or even `C:\ProgramData\Laragon\bin\git`.
103109
@@ -107,8 +113,8 @@ Use the browse to locate the folder and find either the `git.exe` or the `bash.e
107113

108114
Click on the Starting Directory `v` and then untick the "*Use parent process directory*"...
109115

110-
![](../assets/pasted-image-20240216105847.png)
111-
This should then show `%USERPROFILE%` in a text field and `Browse` button underneath...
116+
![](../assets/pasted-image-20240216105847.png)
117+
This should then show `%USERPROFILE%` in a text field and `Browse` button underneath...
112118

113119
![](../assets/pasted-image-20240216105903.png)
114120

@@ -121,7 +127,8 @@ No matter what is shown, clear the content and enter the following in its place.
121127
Click `SAVE` to save the changes
122128

123129
### Visual flair (optional)
124-
You may optionally customise the appearance of the terminal.
130+
131+
You may optionally customise the appearance of the terminal.
125132

126133
Adrian tends to do this to visually identify the various prompts.
127134

@@ -140,15 +147,16 @@ Here are the settings Adrian has for this terminal prompt:
140147
Click Save then you can click the `X` next to settings to close the dialog.
141148
![](../assets/pasted-image-20240216111033.png)
142149

143-
Finally you are able to open the new terminal by clicking on the `v` and selecting your custom terminal or using the short-cut it shows on the right next to your custom terminal.
150+
Finally you are able to open the new terminal by clicking on the `v` and selecting your custom terminal or using the
151+
short-cut it shows on the right next to your custom terminal.
144152

145153
![](../assets/pasted-image-20240216111111.png)
146154

147155
You will now have your terminal open and ready:
148156

149157
![](../assets/pasted-image-20240216111239.png)
150158

151-
152159
# Advanced Users
153160

154-
If you want to make your CLI look even cooler (more useful) then something like OhMyPosh (https://ohmyposh.dev/) may help.
161+
If you want to make your CLI look even cooler (more useful) then something like OhMyPosh (https://ohmyposh.dev/) may
162+
help.

docs/03-repositories-and-folders.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,25 @@ Select the *Command Prompt* option
1616

1717
When the terminal opens use the following commands to change into your "user home" and make the `Source\Repos` folder.
1818

19-
> **Important:** We tend to use the forward slash `/` in notes as they show up easily, plus most operating systems other than Windows use the `/` as the folder separator.
20-
>
19+
> **Important:** We tend to use the forward slash `/` in notes as they show up easily, plus most operating systems other
20+
> than Windows use the `/` as the folder separator.
21+
>
2122
> Later you will see this in action when using the Git command line.
2223
2324
Here are the commands to use:
25+
2426
```shell
2527
cd %userprofile%
2628
mkdir Source
2729
mkdir Source\Repos
2830
```
31+
2932
You should now have the folders created.
3033

3134
Check this using:
35+
3236
```shell
3337
dir Source\Repos
3438
```
39+
3540
It should show a folder listing with no files.

docs/04-git-started.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ We are now ready to get started, and create a repository and work with it.
44

55
## Initialising a Repository for a 'project'
66

7-
There are three main ways to start a project.
7+
There are three main ways to start a project.
88

99
Two of them presume you have no existing files to begin with, and the third when you have files in an existing folder.
1010

@@ -32,7 +32,8 @@ git init .
3232

3333
![](pasted-image-20240216113320.png)
3434

35-
The command prompt will now show either `(master)` or `(main)` - if it is `master`, we will show you later how to (a) change it to `main` for the current project and (b) to make `main` the default.
35+
The command prompt will now show either `(master)` or `(main)` - if it is `master`, we will show you later how to (a)
36+
change it to `main` for the current project and (b) to make `main` the default.
3637

3738
### Option 2: Initialise project and folder at same time
3839

@@ -51,21 +52,24 @@ cd Duck-Rogers
5152

5253
The best part of this is that you are basically able to use the previous options, except the folder already exists.
5354

54-
For example, if `Duck-Rogers` already exist and has files, then, if we are at the parent folder for Duck-Rogers we can use the `git init Duck-Rogers` command.
55+
For example, if `Duck-Rogers` already exist and has files, then, if we are at the parent folder for Duck-Rogers we can
56+
use the `git init Duck-Rogers` command.
5557

5658
![](pasted-image-20240216114404.png)
5759

58-
If you are in the `Duck-Rogers` folder and there are files in the folder then using the `git init .` command will do the same thing.
60+
If you are in the `Duck-Rogers` folder and there are files in the folder then using the `git init .` command will do the
61+
same thing.
5962

6063
![](pasted-image-20240216114456.png)
6164

62-
6365
## Verify Repository was Created
6466

6567
To check it is created we use the `ls -la` command:
6668

6769
![](pasted-image-20240216113831.png)
6870

69-
Notice the last line. The `d` at the start tells you it is a folder (directory), and its name is `.git`. It is a hidden folder.
71+
Notice the last line. The `d` at the start tells you it is a folder (directory), and its name is `.git`. It is a hidden
72+
folder.
7073

71-
All tracking of changes are then stored in the `.git` folder. If you delete this folder, you delete the whole history of your project.
74+
All tracking of changes are then stored in the `.git` folder. If you delete this folder, you delete the whole history of
75+
your project.

docs/05-global-settings.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
## Global configuration changes
22

3-
Git, like any software has many things that can be changed. These area stored in a global configuration file, in a project only configuration file.
3+
Git, like any software has many things that can be changed. These area stored in a global configuration file, in a
4+
project only configuration file.
45

5-
Most of the configuration options are able to be set for both, but we show the global (for you as the user) changes you may want to make.
6+
Most of the configuration options are able to be set for both, but we show the global (for you as the user) changes you
7+
may want to make.
68

79
### Git User Name and Email Address
810

@@ -18,6 +20,7 @@ The `--global` indicates that the changes are stored for this and all future pro
1820
![](pasted-image-20240216124422.png)
1921

2022
To see the global settings...
23+
2124
```shell
2225
git config --list --global
2326
```
@@ -51,28 +54,24 @@ The `--global` indicates that the changes are stored for this and all future pro
5154

5255
![](pasted-image-20240216124422.png)
5356

54-
5557
### Default "Branch" name to Main...
5658

5759
To do this for ALL FUTURE projects we use:
5860

5961
```bash
6062
git config --global init.defaultBranch main
6163
```
64+
6265
### Change Current Project's Branch Name
6366

6467
To change the current 'master branch' to be the 'main branch' we need to do the following *AFTER* a commit is completed:
68+
6569
```bash
6670
git branch -m master main
6771
```
6872

6973
![](pasted-image-20240216125018.png)
7074

71-
72-
73-
74-
75-
7675
### Default Commit Message Editor
7776

7877
It is possible to change the code editor for commit messages to something like Notepad.
@@ -89,9 +88,11 @@ To change it to Notepad we would use:
8988
git config --global core.editor "notepad"
9089
```
9190

92-
> **Important:** when using a GUI editor such as Notepad, you **MUST** **SAVE** and **CLOSE** the message, then (usually optionally) **QUIT** the application for the message to be transferred to the git command.
91+
> **Important:** when using a GUI editor such as Notepad, you **MUST** **SAVE** and **CLOSE** the message, then (usually
92+
> optionally) **QUIT** the application for the message to be transferred to the git command.
9393
94-
Now when you enter `git commit` the Notepad editor will open. The command line will tell you it is waiting for the editor to close a file (`COMMIT_MESSAGE`).
94+
Now when you enter `git commit` the Notepad editor will open. The command line will tell you it is waiting for the
95+
editor to close a file (`COMMIT_MESSAGE`).
9596

9697
![](pasted-image-20240223102507.png)
9798

@@ -101,7 +102,8 @@ When Notepad is opened, it will show a set of comments that tell you details abo
101102

102103
Now editing the commit message and adding the details that may be more than just a one liner is easy.
103104

104-
You then enter the SHORT commit message and, as required, a blank line followed by more details about the changes that have been made to the project.
105+
You then enter the SHORT commit message and, as required, a blank line followed by more details about the changes that
106+
have been made to the project.
105107

106108
For example:
107109

@@ -117,8 +119,6 @@ feat(readme): Add demo commit demo of external editor
117119
- Optionally, quit the editor (`ALT`+`F4`)
118120
```
119121

120-
121-
122-
> **Warning:** Tests have indicated that you will not be able to use 'VSCode' as the editor for messages.
123-
>
122+
> **Warning:** Tests have indicated that you will not be able to use 'VSCode' as the editor for messages.
123+
>
124124
> On execution the editor does not negotiate correctly with the command line and git aborts the commit.

docs/06-read-me.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## Creating a `ReadMe.md` for the project
22

3-
The Bash/git shell has the ability to create a empty file really easily.
3+
The Bash/git shell has the ability to create a empty file really easily.
44

55
For example an empty `ReadMe.md` file would be created using:
66

docs/08-status-add-commit.md

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Checking the status of the repository is done using the `git status` command:
55
```shell
66
git status
77
```
8+
89
![](pasted-image-20240216121457.png)
910

1011
In this example, we have two files that are not "tracked" by the repository.
@@ -18,13 +19,15 @@ To add a file to be tracked we use `git add FILENAME`. For example:
1819
```shell
1920
git add ReadMe.md
2021
```
22+
2123
![](pasted-image-20240216121921.png)
2224

2325
Checking the status after adding shows:
2426

2527
![](pasted-image-20240216122006.png)
2628

27-
Once a file is tracked, any time you make changes and are happy with them, you should perform a `git status` and then `git add` the changed file.
29+
Once a file is tracked, any time you make changes and are happy with them, you should perform a `git status` and
30+
then `git add` the changed file.
2831

2932
![](pasted-image-20240216122531.png)
3033

@@ -52,11 +55,13 @@ Now our `git status` should show:
5255

5356
![](pasted-image-20240216123105.png)
5457

55-
The committed file is still tracked, but as no changes have been made it does not show.
58+
The committed file is still tracked, but as no changes have been made it does not show.
5659

57-
> **Best Practice Hint:** Note in my message, that I included `init:` at the start. This is telling me (and anyone who is on the project) that it is the initialisation of the project.
58-
>
59-
> If it is a new feature we use `feat` instead and often would add the feature name in `( )` round brackets. More on this later.
60+
> **Best Practice Hint:** Note in my message, that I included `init:` at the start. This is telling me (and anyone who
61+
> is on the project) that it is the initialisation of the project.
62+
>
63+
> If it is a new feature we use `feat` instead and often would add the feature name in `( )` round brackets. More on
64+
> this later.
6065
6166
### Exercise
6267

@@ -84,19 +89,15 @@ feat(readme): Update ReadMe.md to include author and version
8489

8590
![](pasted-image-20240216123759.png)
8691

87-
88-
89-
90-
91-
9292
### Did you forget `-m` on `git commit`?
9393

9494
If you type in `git commit` and do not add the `-m` with the message then the `vi` editor is shown.
9595

9696
The easiest way out is to do the following:
9797

9898
- **Option 1:** Press **`ESCAPE`** then type **`:qa`** - This is a quit and abandon changes. This is the better option.
99-
100-
- **Option 2:** Press **`ESCAPE`**, then press and hold the **`SHIFT`** whilst typing **`Z`** twice - This is a save and quit
99+
100+
- **Option 2:** Press **`ESCAPE`**, then press and hold the **`SHIFT`** whilst typing **`Z`** twice - This is a save and
101+
quit
101102

102103
![](pasted-image-20240216125345.png)

0 commit comments

Comments
 (0)