Skip to content

Commit a4a56f4

Browse files
authored
Merge pull request #18 from UMLCloudComputing/feat--Update-Tutorials-section
Feat update tutorials section
2 parents 5f4dfed + 1e480d0 commit a4a56f4

File tree

9 files changed

+51
-48
lines changed

9 files changed

+51
-48
lines changed

docs/tutorials/Git Version Control/Basics/Branch.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,21 @@ sidebar_position: 6
66

77
### Using Git branches
88

9-
A [branch](/docs/tutorials/Git%20Version%20Control/Basics/Index.md/#branch) is a seperate version of the main repository.<br/>
9+
A [branch](./Index.md#branch) is a seperate version of the main repository.<br/>
1010
Branches are particuarly useful when a developer wants to update parts of a large project.
1111

1212
Git branches allow development on a new features and designs independent from other work on the main branch.<br/>
13-
When the work is complete on a branch, it can be [merged](/docs/tutorials/Git%20Version%20Control/Basics/Index.md/#merge) back into the main branch/project.<br/>
13+
When the work is complete on a branch, it can be [merged](./Index.md#merge) back into the main branch/project.<br/>
1414
With branches, it's also possible to work on different parts of a project simultaneously without any part impacting another.
1515

1616
### Creating a new Branch
1717

18-
Let's create a new [branch](/docs/tutorials/Git%20Version%20Control/Basics/Index.md/#branch) to work on a feature without modifying the main project's working code:
18+
Let's create a new [branch](./Index.md#branch) to work on a feature without modifying the main project's working code:
1919

2020
``` bash
2121
[user@localhost] $ git branch hello-world-pictures
2222
```
23-
The command `git branch hello-world-pictures` will create a new [branch](/docs/tutorials/Git%20Version%20Control/Basics/Index.md/#branch) called "hello-world-pictures".<br />
23+
The command `git branch hello-world-pictures` will create a new [branch](./Index.md#branch) called "hello-world-pictures".<br />
2424
Let's confirm that the branch was created:
2525
``` bash
2626
[user@localhost] $ git branch
@@ -29,12 +29,12 @@ hello-world-pictures
2929
```
3030
> Important: Whenever creating new branches, the branch from which the *new* branch is sourced from is the branch which was mounted when the git branch command was called. In scenario above, the command was called from within the `master` branch. Hence, all the initial files and changes are sourced from the `master` branch for the `hello-world-pictures` branch.
3131
32-
A new branch called "hello-world-pictures" has been created, however the `*` symbol indicates that we are currently still on the `master` [branch](/docs/tutorials/Git%20Version%20Control/Basics/Index.md/#branch).
32+
A new branch called "hello-world-pictures" has been created, however the `*` symbol indicates that we are currently still on the `master` [branch](./Index.md#branch).
3333
> When viewing the output of `git branch`, the `*` symbol indicates the current branch.
3434
3535
![Git-Staging-Diagram-3](../../../../static/img/git-tutorial/git-workflow-3.png)
3636

37-
In order to leave the `master` [branch](/docs/tutorials/Git%20Version%20Control/Basics/Index.md/#branch) and change to the "hello-world-pictures" [branch](/docs/tutorials/Git%20Version%20Control/Basics/Index.md/#branch) we have to use the [`checkout`](/docs/tutorials/Git%20Version%20Control/Basics/Index.md/#checkout) command.
37+
In order to leave the `master` [branch](./Index.md) and change to the "hello-world-pictures" [branch](./Index.md) we have to use the [`checkout`](./Index.md#checkout) command.
3838

3939
``` bash
4040
[user@localhost] $ git checkout hello-world-pictures
@@ -77,7 +77,7 @@ Then let's update our html code:
7777
</html>
7878
```
7979
80-
Let's [save and exit](/docs/tutorials/Git%20Version%20Control/Basics/Index.md/#basic-editing-on-vim) and check the status of the current [branch](./Index.md/#branch)
80+
Let's [save and exit](./New%20Files.md/#basic-editing-on-vim) and check the status of the current [branch](./Index.md#branch)
8181

8282
``` bash
8383
[user@localhost] $ git status
@@ -94,14 +94,14 @@ Untracked files:
9494
no changes added to commit (use "git add" and/or "git commit -a")
9595
```
9696

97-
The output indicates that there are tracked changes to `index.html`, however the file is not [staged](./Index.md/#stage) for a [commit](/docs/tutorials/Git%20Version%20Control/Basics/Index.md/#commit). Moreover, there is also the image `git.png` that is currently untracked.
97+
The output indicates that there are tracked changes to `index.html`, however the file is not [staged](./Index.md#stage) for a [commit](./Index.md#commit). Moreover, there is also the image `git.png` that is currently untracked.
9898

99-
So let's add all the changes to the [staging area](/docs/tutorials/Git%20Version%20Control/Basics/Index.md/#staging-area):
99+
So let's add all the changes to the [staging area](./Index.md#staging-area):
100100
``` bash
101101
[user@localhost] $ git add --all
102102
```
103103

104-
Now let's check the status of the [branch](/docs/tutorials/Git%20Version%20Control/Basics/Index.md/#branch):
104+
Now let's check the status of the [branch](./Index.md#branch):
105105
``` bash
106106
[user@localhost] $ git status
107107
On branch hello-world-pictures
@@ -113,7 +113,7 @@ Changes to be committed:
113113

114114
Now all the changes are staged and can be committed.
115115

116-
Since we're satifisied with our changes, let's [commit](/docs/tutorials/Git%20Version%20Control/Basics/Index.md/#commit) them to our [branch](/docs/tutorials/Git%20Version%20Control/Basics/Index.md/#branch):
116+
Since we're satifisied with our changes, let's [commit](./Index.md#commit) them to our [branch](./Index.md#branch):
117117
``` bash
118118
[user@localhost] $ git commit -m "feat: Added image to hello world"
119119
[hello-world-pictures 83d7fb0] feat: Added image to hello world
@@ -130,15 +130,15 @@ Let's check content within our branch:
130130
[user@localhost] $ ls
131131
git.png index.html README.md styles.css
132132
```
133-
Notice how the `hello-world-pictures` [branch](/docs/tutorials/Git%20Version%20Control/Basics/Index.md/#branch) has the image `git.png`. As per the edits we've made, `index.html` should also have modified code to include the image.
133+
Notice how the `hello-world-pictures` [branch](./Index.md#branch) has the image `git.png`. As per the edits we've made, `index.html` should also have modified code to include the image.
134134

135135
Now's let's change to the `master` branch using the `checkout` command:
136136
``` bash
137137
[user@localhost] $ git checkout master
138138
Switched to branch 'master'
139139
```
140140

141-
Finally let's check the content of this [branch](/docs/tutorials/Git%20Version%20Control/Basics/Index.md/#branch):
141+
Finally let's check the content of this [branch](./Index.md#branch):
142142
``` bash
143143
[user@localhost] $ ls
144144
index.html README.md styles.css

docs/tutorials/Git Version Control/Basics/Commit.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ sidebar_position: 5
66

77
![Git-Staging-Diagram-2](../../../../static/img/git-tutorial/git-workflow-2.png)
88

9-
Commits keep track of progress and changes as we work. Git treats each [`commit`](./Index.md/#commit) as a "save point". It's a point in the project which can be reverted to if a bug is found, or you want to make a change.
9+
Commits keep track of progress and changes as we work. Git treats each [`commit`](./Index.md#commit) as a "save point". It's a point in the project which can be reverted to if a bug is found, or you want to make a change.
1010

11-
Whenever performing a [`commit`](./Index.md/#commit), **always** include a commit **message**.
11+
Whenever performing a [`commit`](./Index.md#commit), **always** include a commit **message**.
1212
It's always best practice to do so and improves understanding of your code for others and subsequently maintainability of your project.
1313

1414
``` bash
@@ -46,16 +46,16 @@ To show this let's update `index.html` slightly:
4646
</body>
4747
</html>
4848
```
49-
>Recall, to open a file to edit in your working directory with [Vim](./Index.md/#vim), enter the command `vim `*`filename`* and enter insert mode (`I` key on the keyboard). To save and exit enter normal mode (`esc` key) and enter the command `:wq` (write and quit).
49+
>Recall, to open a file to edit in your working directory with [Vim](./Index.md#vim), enter the command `vim `*`filename`* and enter insert mode (`I` key on the keyboard). To save and exit enter normal mode (`esc` key) and enter the command `:wq` (write and quit).
5050
51-
Now let's check the status of our [repo](./Index.md/#repository-repo), however with the `--short` option to get a more compact response:
51+
Now let's check the status of our [repo](./Index.md#repository-repo), however with the `--short` option to get a more compact response:
5252
``` bash
5353
[user@localhost] $ git status --short
5454
M index.html
5555
```
5656
> Note: The `--short` option on `git status` is also synonymous with `-s`. Hence, either `git status -s` or `git status --short` can be used to perform the same action.
5757
58-
Here's some valuable [information](./Index.md/#git-status-short) about short git status flags.
58+
Here's some valuable [information](./Index.md#git-status-short) about short git status flags.
5959

6060
Now let's commit directly:
6161
``` bash

docs/tutorials/Git Version Control/Basics/Getting Started.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ Creating a new folder for a project:
1212
[user@localhost] $ cd newProject
1313
```
1414

15-
[`mkdir`](./Index.md/#mkdir) makes a new directory. <br />
16-
[`cd`](./Index.md/#cd) changes the current working directory.
15+
[`mkdir`](./Index.md#mkdir) makes a new directory. <br />
16+
[`cd`](./Index.md#cd) changes the current working directory.
1717

1818
## Initialize Git
1919
Once in the correct folder, initialize git on the folder:

docs/tutorials/Git Version Control/Basics/Git Basics.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ Git is a version control system that helps collaborate on code and keep track of
1010

1111
## What does Git do?
1212

13-
* Manage projects with [**repositories**](./Index.md/#repository).
13+
* Manage projects with [**repositories**](./Index.md#repository-repo).
1414
* **Clone** a project to work with a local copy.
15-
* Control changes with [**Staging**](./Index.md/#staging) and [**Committing**](./Index.md/#commit).
16-
* [**Branch**](./Index.md/#branch) and [**Merge**](./Index.md/#merge) to work on different parts and versions of a project.
17-
* [**Pull**](./Index.md/#pull) the latest version of the project a local copy.
18-
* [**Push**](./Index.md/#push) local updates to a project.
15+
* Control changes with [**Staging**](./Index.md#stage) and [**Committing**](./Index.md#commit).
16+
* [**Branch**](./Index.md#branch) and [**Merge**](./Index.md#merge) to work on different parts and versions of a project.
17+
* [**Pull**](./Index.md#pull) the latest version of the project a local copy.
18+
* [**Push**](./Index.md#push) local updates to a project.
1919

2020
## Git vs Github
2121
* Git and Github are <mark>not</mark> the same.
@@ -43,7 +43,7 @@ If installed properly, the output should be in format `git version X.Y`.
4343
```
4444

4545
## Configuring Git
46-
When performing git [**commits**](./Index.md/#commit), git needs to know who you are. <br />
46+
When performing git [**commits**](./Index.md#commit), git needs to know who you are. <br />
4747
Configure the username and email for git with the following commands:
4848
``` bash
4949
git config --global user.name "YOUR_USERNAME"

docs/tutorials/Git Version Control/Basics/Index.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@ sidebar_position: 10
77
Index of terminology within this tutorial
88

99
### Push
10-
>*noun*: To publish your changes to a repository: `git push`
10+
>*noun, verb*: To publish your changes to a repository: `git push`
11+
12+
### Pull
13+
>*noun, verb*: To fetch and integrate changes in a remote [repository](#repository-repo) with the changes in a local [repository](#repository-repo). `git pull`*` remote-name branch-name`*
1114
1215
### Repository (*repo*)
1316
>*noun*: A type of centrally located storage where you can keep all your project's files and resources.

docs/tutorials/Git Version Control/Basics/Merge Conflicts.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,12 @@ Second, we need open `index.html` for editing and adding in our new [image](http
4343
</body>
4444
</html>
4545
```
46-
After saving and exiting, we need to [stage](./Index.md/#stage) all the changes:
46+
After saving and exiting, we need to [stage](./Index.md#stage) all the changes:
4747
``` bash
4848
[user@localhost] $ git add --all
4949
```
5050

51-
Now let's [commit](./Index.md/#commit) the changes to the `hello-world-pictures` branch:
51+
Now let's [commit](./Index.md#commit) the changes to the `hello-world-pictures` branch:
5252
``` bash
5353
[user@localhost] $ git commit -m "feat: Added hello world image"
5454
[hello-world-pictures 9356dc6] feat: added hello world image
@@ -63,7 +63,7 @@ Now let's merge the changes from `hello-world-pictures`:
6363
CONFLICT (content): Merge conflict in index.html
6464
Automatic merge failed; fix conflicts and then commit the result.
6565
```
66-
Yikes! We've encountered a [merge conflict](./Index.md/#merge-conflict)!
66+
Yikes! We've encountered a [merge conflict](./Index.md#merge-conflict)!
6767

6868
## What is a Merge Conflict?
6969

docs/tutorials/Git Version Control/Basics/Merging.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ sidebar_position: 7
66

77
## Merging Branches
88

9-
Branch [merging](./Index.md/#merge) allows the changes from one branch to be added to another, essentially combining the changes. Merging typically goes hand in hand with branches since the changes specific to a branch are often combined back to the main project code. A common scenario in industry is to use [branches](./Index.md/#branch) to work of specific issues, features, or perform code maintainence. Once the edits are complete, the [branch's](./Index.md/#branch) edits are [merged](./Index.md/#merge) back into a `master` or main branch which contains the code used in production.
9+
Branch [merging](./Index.md#merge) allows the changes from one branch to be added to another, essentially combining the changes. Merging typically goes hand in hand with branches since the changes specific to a branch are often combined back to the main project code. A common scenario in industry is to use [branches](./Index.md#branch) to work of specific issues, features, or perform code maintainence. Once the edits are complete, the [branch's](./Index.md#branch) edits are [merged](./Index.md#merge) back into a `master` or main branch which contains the code used in production.
1010

1111
Let's demonstrate how to merge branches alongside a bit of review!
1212

@@ -58,8 +58,8 @@ Great! Now since our modifications are unstaged, let's go ahead and stage them a
5858
```
5959
> Note: The command above used the `-a` option to stage and commit all changes in one-step.
6060
61-
Finally, now let's [merge](./Index.md/#merge) our changes back into the `master` branch! <br/>
62-
First we need to [`checkout`](./Index.md/#checkout) to to the `master` branch.
61+
Finally, now let's [merge](./Index.md#merge) our changes back into the `master` branch! <br/>
62+
First we need to [`checkout`](./Index.md#checkout) to to the `master` branch.
6363
``` bash
6464
[user@localhost] $ git checkout master
6565
Switched to branch 'master'
@@ -80,4 +80,4 @@ Since we're done working on the `copyright-fix` branch and it's no longer needed
8080
Deleted branch copyright-fix (was 5be7c4a).
8181
```
8282

83-
Amazing! We successfully managed to add a new piece to our project using [branches](./Index.md/#branch) and sucessfully [merged](./Index.md/#merge) the changes back to the `master` [branch](./Index.md/#branch).
83+
Amazing! We successfully managed to add a new piece to our project using [branches](./Index.md#branch) and sucessfully [merged](./Index.md#merge) the changes back to the `master` [branch](./Index.md#branch).

docs/tutorials/Git Version Control/Basics/New Files.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ sidebar_position: 3
66

77
### Adding new Files
88

9-
Let's find out how to add new files to a git [repository](./Index.md/#repository-repo)! <br />
10-
Within this tutorial, we'll be using the [Vim](./Index.md/#vim) CLI text-edtior to create a edit files. <br /> This can just as easily be done with your prefered text-editor. <br />
11-
IE with `code .` to open the current working directory within [Visual Studio Code](./Index.md/#visual-studio-code).
9+
Let's find out how to add new files to a git [repository](./Index.md#repository-repo)! <br />
10+
Within this tutorial, we'll be using the [Vim](./Index.md#vim) CLI text-edtior to create a edit files. <br /> This can just as easily be done with your prefered text-editor. <br />
11+
IE with `code .` to open the current working directory within [Visual Studio Code](./Index.md#visual-studio-code).
1212

1313
``` shell
1414
[user@localhost] $ vim index.html
@@ -46,16 +46,16 @@ Let's put some code within `index.html`:
4646
</html>
4747
```
4848
#### Basic Editing on Vim
49-
>In order to enter content into `index.html` using [Vim](./Index.md/#vim), enter insert mode by pressing the "I" key on your keyboard. Then either type or paste the code into the editor. <br />
50-
To save and exit out of [Vim](./Index.md/#vim) simply press the escape key and then type and enter `:wq` (write and quit).
49+
>In order to enter content into `index.html` using [Vim](./Index.md#vim), enter insert mode by pressing the "I" key on your keyboard. Then either type or paste the code into the editor. <br />
50+
To save and exit out of [Vim](./Index.md#vim) simply press the escape key and then type and enter `:wq` (write and quit).
5151

52-
Now let's check the contant of our directory using [`ls`](./Index.md/#ls):
52+
Now let's check the contant of our directory using [`ls`](./Index.md#ls):
5353
``` shell
5454
[user@localhost] $ ls
5555
index.html
5656
```
5757

58-
Since the file is within our directory now, let's check if it's part of our [repo](./Index.md/#repository-repo) using `git status`:
58+
Since the file is within our directory now, let's check if it's part of our [repo](./Index.md#repository-repo) using `git status`:
5959
``` shell
6060
[user@localhost] $ git status
6161
On branch master
@@ -75,4 +75,4 @@ There are two potentional states for files in a repository folder:
7575
* Tracked: git knows about these and they are in your repository
7676
* Untracked: files that are in your working directory, however not added to your repository.
7777

78-
Adding the first files to an empty repository are all untracked. In order for them to be tracked, they must be [staged](./Index.md/#stage) or must add them to a [staging area](./Index.md/#staging-area)
78+
Adding the first files to an empty repository are all untracked. In order for them to be tracked, they must be [staged](./Index.md#stage) or must add them to a [staging area](./Index.md#staging-area)

docs/tutorials/Git Version Control/Basics/Staging Area.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ sidebar_position: 4
88

99
As you are working on a project, you add, edit, and remove files. When you reach a satisfactory point, you should add the files to a staging area.
1010

11-
[Staged](Index.md/#stage) files are ready to be [committed](./Index.md/#commit) to your working repository.
11+
[Staged](Index.md#stage) files are ready to be [committed](./Index.md#commit) to your working repository.
1212

1313
Back to our `newProject`, we can now make `index.html` as a tracked file by simple adding it to the staging area using `git add`:
1414
``` shell
1515
[user@localhost] $ git add index.html
1616
```
1717

18-
Now `index.html` should be [staged](./Index.md/#stage):
18+
Now `index.html` should be [staged](./Index.md#stage):
1919
``` shell
2020
[user@localhost] $ git status
2121
On branch master
@@ -31,7 +31,7 @@ In other words, the file is now added to the staging area!
3131

3232
### Staging more than one file
3333

34-
It's often that we end up modifying more than one file within a project before we decide to [stage](./Index.md/#stage) them. Let's see how to [stage](./Index.md/#stage) them all at once:
34+
It's often that we end up modifying more than one file within a project before we decide to [stage](./Index.md#stage) them. Let's see how to [stage](./Index.md#stage) them all at once:
3535

3636
Let's start by adding a `README.md` file to our repository to describe it:
3737
``` shell
@@ -42,7 +42,7 @@ and add the following content:
4242
# Hello world
4343
This repository exists as part of a git tutorial!
4444
```
45-
>Recall to use the `:wq` command in [Vim](./Index.md/#vim) to write and quit.
45+
>Recall to use the `:wq` command in [Vim](./Index.md#vim) to write and quit.
4646
4747
Let's also add a CSS file called `styles.css`:
4848
``` shell
@@ -60,7 +60,7 @@ body {
6060
animation-duration: 4s;
6161
}
6262
```
63-
>Again, recall to use the `:wq` command in [Vim](./Index.md/#vim) to write and quit.
63+
>Again, recall to use the `:wq` command in [Vim](./Index.md#vim) to write and quit.
6464
6565
Finally let's update `index.html` to include our new stylesheet (`styles.css`):
6666
``` shell
@@ -80,7 +80,7 @@ Finally let's update `index.html` to include our new stylesheet (`styles.css`):
8080
</body>
8181
</html>
8282
```
83-
> Once again, recall to use the `:wq` command in [Vim](./Index.md/#vim) to write and quit.
83+
> Once again, recall to use the `:wq` command in [Vim](./Index.md#vim) to write and quit.
8484
8585
Now let's add all these new files and changes to our staging area using the following command:
8686
``` shell

0 commit comments

Comments
 (0)