Skip to content

Commit ca570a8

Browse files
committed
Review content; Embed videos
1 parent 219fee9 commit ca570a8

2 files changed

Lines changed: 76 additions & 26 deletions

File tree

docs/exercises/hello-version-control/index.qmd

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -34,45 +34,49 @@ For more information about Markdown syntax, see the [Markdown Cheat Sheet](https
3434

3535
Once you see the updated README file contents reflected in your remote repository on GitHub, you have succeeded. Repeat the file-editing, committing and pushing steps at least one more time for good measure.
3636

37+
## Walkthrough Video
38+
39+
{{< video https://www.youtube.com/watch?v=UCcbvta2dp4
40+
title= "Hello, Version Control Exercise Walkthrough"
41+
>}}
42+
3743
<hr>
3844

3945
## Optional Further Exploration (Git CLI)
4046

4147
Beginners are recommended to use GitHub Desktop to complete the exercise above, however if anyone is interested in completing the exercise using Git from the command line, see the commands below.
4248

43-
Create a GitHub repo (perhaps called "my-first-repo"), obtain its remote address, then clone the repo and navigate there from the command line:
49+
Cloning a repo given its remote address:
4450

4551
```sh
52+
# navigate to the desktop or wherever you want the repo to be downloaded:
4653
cd ~/Desktop
47-
git clone REMOTE_ADDRESS # where REMOTE_ADDRESS is the remote address of your GitHub repo
48-
cd my-first-repo/
54+
55+
# specify the the remote address of your own GitHub repo:
56+
git clone git@github.com:YOUR_USERNAME/my-first-repo.git
4957
```
5058

51-
Open the project in the text editor:
59+
Navigating into the repo's root directory:
5260

5361
```sh
54-
code .
62+
cd my-first-repo/
5563
```
5664

57-
Create a file using the text editor (or use the command line):
65+
Opening the repo in the VS Code text editor:
5866

5967
```sh
60-
touch my_file.md
68+
code .
6169
```
6270

63-
Edit and save the file, then stage the changes and make a local commit:
71+
Staging and committing changes (after editing and saving files):
6472

6573
```sh
6674
git add .
6775
git commit -m "My first commit"
6876
```
6977

70-
Push the changes up to GitHub:
78+
Pushing the changes up to GitHub:
7179

7280
```sh
7381
git push origin main
74-
7582
```
76-
77-
78-
Repeat the process of editing and committing and pushing as desired.

docs/exercises/pull-request-workflow/index.qmd

Lines changed: 59 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,64 @@ Adopt a Pull Request Workflow to collaborate with yourself (on independent proje
66

77
## Instructions
88

9-
This is a process we will follow to add or revise the contents of our own existing repos:
9+
This is a process we will follow to add or revise the contents of our own existing repos. If you have just completed the ["Hello Version Control" exercise](../hello-version-control/index.qmd), you can start at step 3:
10+
11+
Repo Setup Process:
1012

1113
1. Choose one of your existing GitHub repos, or create a new one (i.e. the "origin" repo).
12-
2. Clone the repo locally if you haven't already done so. Ensure your local main branch is up-to-date with the origin main branch.
13-
3. Checkout a new local feature branch called something like "new-feature-123".
14-
4. Modify some part of the codebase (for this exercise, any trivial change will do), save your work, and make a commit on the local feature branch.
15-
5. Push the local feature branch revisions to the origin repo.
16-
6. Create a Pull Request to compare the feature branch changes against the main branch.
17-
7. In the Pull Request, review the changes and optionally make some comments.
18-
8. When you are satisfied with the changes, merge the Pull Request via the GitHub interface.
19-
20-
To repeat the process (after changes have been merged):
21-
22-
9. Using your Git Client, checkout the main branch, and pull the most recent changes from the origin main branch.
23-
10. Then repeat steps 3-8 above.
14+
2. Clone the repo locally and navigate there from the command-line, if you haven't already done so.
15+
16+
PR Workflow Process:
17+
18+
3. Ensure your local main branch is up-to-date with the origin main branch: Using your Git Client, checkout the main branch, then fetch and pull the most recent changes from the origin main branch.
19+
4. Checkout a new local feature branch called something like "new-feature-123".
20+
5. Modify some part of the codebase (for example, making a trivial change to the README), save your work, and make a commit on the local feature branch.
21+
6. Push the local feature branch revisions to the origin repo.
22+
7. Create a Pull Request to compare the feature branch changes against the main branch.
23+
8. In the Pull Request, review the changes and optionally make some comments.
24+
9. When you are satisfied with the changes, merge the Pull Request via the GitHub interface.
25+
26+
To repeat the PR Workflow Process (after PR has been merged), repeat steps 3-9 above.
27+
28+
## Walkthrough Video
29+
30+
{{< video https://www.youtube.com/watch?v=NTzUbULGc3o
31+
title= "Pull Request Workflow Exercise Walkthrough"
32+
>}}
33+
34+
<hr>
35+
36+
## Optional Further Exploration (Git CLI)
37+
38+
Beginners are recommended to use GitHub Desktop to complete the exercise above, however if anyone is interested in completing the exercise using Git from the command line, see the commands below.
39+
40+
Ensuring local main branch is up-to-date:
41+
42+
```sh
43+
# checkout local main branch:
44+
git checkout main
45+
46+
# sync with origin main branch:
47+
git fetch origin
48+
git pull origin main
49+
```
50+
51+
52+
Checking out new feature branch called "new-feature-123":
53+
54+
```sh
55+
git checkout -b new-feature-123
56+
```
57+
58+
Making a commit (after making changes):
59+
60+
```sh
61+
git add .
62+
git commit -m "My new feature"
63+
```
64+
65+
Pushing the local feature branch revisions to the origin repo:
66+
67+
```sh
68+
git push origin new-feature-123
69+
```

0 commit comments

Comments
 (0)