You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/exercises/hello-version-control/index.qmd
+17-13Lines changed: 17 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -34,45 +34,49 @@ For more information about Markdown syntax, see the [Markdown Cheat Sheet](https
34
34
35
35
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.
36
36
37
+
## Walkthrough Video
38
+
39
+
{{< video https://www.youtube.com/watch?v=UCcbvta2dp4
40
+
title= "Hello, Version Control Exercise Walkthrough"
41
+
>}}
42
+
37
43
<hr>
38
44
39
45
## Optional Further Exploration (Git CLI)
40
46
41
47
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.
42
48
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:
44
50
45
51
```sh
52
+
# navigate to the desktop or wherever you want the repo to be downloaded:
46
53
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:
Copy file name to clipboardExpand all lines: docs/exercises/pull-request-workflow/index.qmd
+59-13Lines changed: 59 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -6,18 +6,64 @@ Adopt a Pull Request Workflow to collaborate with yourself (on independent proje
6
6
7
7
## Instructions
8
8
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:
10
12
11
13
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
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:
0 commit comments