Skip to content

Commit 4269b82

Browse files
authoredFeb 23, 2025··
Initial commit
0 parents  commit 4269b82

30 files changed

+649
-0
lines changed
 

‎.github/dependabot.yml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "monthly"

‎.github/steps/-step.txt

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
0

‎.github/steps/0-welcome.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<!-- readme -->

‎.github/steps/1-create-a-branch.md

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
<!--
2+
<<< Author notes: Step 1 >>>
3+
Choose 3-5 steps for your course.
4+
The first step is always the hardest, so pick something easy!
5+
Link to docs.github.com for further explanations.
6+
Encourage users to open new tabs for steps!
7+
-->
8+
9+
## Step 1: Create a branch
10+
11+
_Welcome to "Introduction to GitHub"! :wave:_
12+
13+
**What is GitHub?**: GitHub is a collaboration platform that uses _[Git](https://docs.github.com/get-started/quickstart/github-glossary#git)_ for versioning. GitHub is a popular place to share and contribute to [open-source](https://docs.github.com/get-started/quickstart/github-glossary#open-source) software.
14+
<br>:tv: [Video: What is GitHub?](https://www.youtube.com/watch?v=pBy1zgt0XPc)
15+
16+
**What is a repository?**: A _[repository](https://docs.github.com/get-started/quickstart/github-glossary#repository)_ is a project containing files and folders. A repository tracks versions of files and folders. For more information, see "[About repositories](https://docs.github.com/en/repositories/creating-and-managing-repositories/about-repositories)" from GitHub Docs.
17+
18+
**What is a branch?**: A _[branch](https://docs.github.com/en/get-started/quickstart/github-glossary#branch)_ is a parallel version of your repository. By default, your repository has one branch named `main` and it is considered to be the definitive branch. Creating additional branches allows you to copy the `main` branch of your repository and safely make any changes without disrupting the main project. Many people use branches to work on specific features without affecting any other parts of the project.
19+
20+
Branches allow you to separate your work from the `main` branch. In other words, everyone's work is safe while you contribute. For more information, see "[About branches](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-branches)".
21+
22+
**What is a profile README?**: A _[profile README](https://docs.github.com/account-and-profile/setting-up-and-managing-your-github-profile/customizing-your-profile/managing-your-profile-readme)_ is essentially an "About me" section on your GitHub profile where you can share information about yourself with the community on GitHub.com. GitHub shows your profile README at the top of your profile page. For more information, see "[Managing your profile README](https://docs.github.com/en/account-and-profile/setting-up-and-managing-your-github-profile/customizing-your-profile/managing-your-profile-readme)".
23+
24+
![profile-readme-example](/images/profile-readme-example.png)
25+
26+
### :keyboard: Activity: Your first branch
27+
28+
1. Open a new browser tab and navigate to your newly made repository. Then, work on the steps in your second tab while you read the instructions in this tab.
29+
2. Navigate to the **< > Code** tab in the header menu of your repository.
30+
31+
![code-tab](/images/code-tab.png)
32+
33+
3. Click on the **main** branch drop-down.
34+
35+
![main-branch-dropdown](/images/main-branch-dropdown.png)
36+
37+
4. In the field, name your branch `my-first-branch`. In this case, the name must be `my-first-branch` to trigger the course workflow.
38+
5. Click **Create branch: my-first-branch** to create your branch.
39+
40+
![create-branch-button](/images/create-branch-button.png)
41+
42+
The branch will automatically switch to the one you have just created.
43+
The **main** branch drop-down bar will reflect your new branch and display the new branch name.
44+
45+
6. Wait about 20 seconds then refresh this page (the one you're following instructions from). [GitHub Actions](https://docs.github.com/en/actions) will automatically update to the next step.

‎.github/steps/2-commit-a-file.md

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<!--
2+
<<< Author notes: Step 2 >>>
3+
Start this step by acknowledging the previous step.
4+
Define terms and link to docs.github.com.
5+
-->
6+
7+
## Step 2: Commit a file
8+
9+
_You created a branch! :tada:_
10+
11+
Creating a branch allows you to edit your project without changing the `main` branch. Now that you have a branch, it’s time to create a file and make your first commit!
12+
13+
**What is a commit?**: A _[commit](https://docs.github.com/pull-requests/committing-changes-to-your-project/creating-and-editing-commits/about-commits)_ is a set of changes to the files and folders in your project. A commit exists in a branch. For more information, see "[About commits](https://docs.github.com/en/pull-requests/committing-changes-to-your-project/creating-and-editing-commits/about-commits)".
14+
15+
### :keyboard: Activity: Your first commit
16+
17+
The following steps will guide you through the process of committing a change on GitHub. A commit records changes in renaming, changing content within, creating a new file, and any other changes made to your project. For this exercise, committing a change requires first adding a new file to your new branch.
18+
19+
> [!NOTE]
20+
> `.md` is a file extension that creates a Markdown file. You can learn more about Markdown by visiting "[Basic writing and formatting syntax](https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax)" in our docs or by taking the "[Communicating using Markdown](https://github.com/skills/communicate-using-markdown)" Skills course.
21+
22+
1. On the **< > Code** tab in the header menu of your repository, make sure you're on your new branch `my-first-branch`.
23+
24+
2. Select the **Add file** drop-down and click **Create new file**.
25+
26+
![create new file option](/images/create-new-file.png)
27+
28+
3. In the **Name your file...** field, enter `PROFILE.md`.
29+
30+
4. In the **Enter file contents here** area, copy the following content to your file:
31+
32+
```
33+
Welcome to my GitHub profile!
34+
```
35+
36+
![profile.md file screenshot](/images/my-profile-file.png)
37+
38+
5. Click **Commit changes...** in the upper right corner above the contents box. For commits, you can enter a short commit message that describes what changes you made. This message helps others know what's included in your commit. GitHub offers a simple default message, but let's change it slightly for practice. First, enter `Add PROFILE.md` in the first text-entry field titled "Commit message".
39+
40+
![screenshot of adding a new file with a commit message](/images/commit-full-screen.png)
41+
42+
6. In this lesson, we'll ignore the other fields and click **Commit changes**.
43+
7. Wait about 20 seconds then refresh this page (the one you're following instructions from). [GitHub Actions](https://docs.github.com/en/actions) will automatically update to the next step.
+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
<!--
2+
<<< Author notes: Step 3 >>>
3+
Just a historic note: the previous version of this step forced the learner
4+
to write a pull request description,
5+
checked that `main` was the receiving branch,
6+
and that the file was named correctly.
7+
-->
8+
9+
## Step 3: Open a pull request
10+
11+
_Nice work making that commit! :sparkles:_
12+
13+
Now that you have made a change to the project and created a commit, it’s time to share your proposed change through a pull request!
14+
15+
**What is a pull request?**: Collaboration happens on a _[pull request](https://docs.github.com/en/get-started/quickstart/github-glossary#pull-request)_. The pull request shows the changes in your branch to other people and allows people to accept, reject, or suggest additional changes to your branch. In a side by side comparison, this pull request is going to keep the changes you just made on your branch and propose applying them to the `main` project branch. For more information about pull requests, see "[About pull requests](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests)".
16+
17+
### :keyboard: Activity: Create a pull request
18+
19+
You may have noticed after your commit that a message displayed indicating your recent push to your branch and providing a button that says **Compare & pull request**.
20+
21+
![screenshot of message and button](/images/compare-and-pull-request.png)
22+
23+
To create a pull request automatically, click **Compare & pull request**, and then skip to step 6 below. If you don't click the button, the instructions below walk you through manually setting up the pull request.
24+
25+
1. Click on the **Pull requests** tab in the header menu of your repository.
26+
2. Click **New pull request**.
27+
3. In the **base:** dropdown, make sure **main** is selected.
28+
4. Select the **compare:** dropdown, and click `my-first-branch`.
29+
30+
![screenshot showing both branch selections](/images/pull-request-branches.png)
31+
32+
5. Click **Create pull request**.
33+
6. Enter a title for your pull request. By default, the title will automatically be the name of your branch. For this exercise, let's edit the field to say `Add my first file`.
34+
7. The next field helps you provide a description of the changes you made. Here, you can add a description of what you’ve accomplished so far. As a reminder, you have: created a new branch, created a file, and made a commit.
35+
36+
![screenshot showing pull request](/images/Pull-request-description.png)
37+
38+
8. Click **Create pull request**. You will automatically be navigated to your new pull request.
39+
9. Wait about 20 seconds then refresh this page (the one you're following instructions from). [GitHub Actions](https://docs.github.com/en/actions) will automatically update to the next step.
40+
41+
> [!NOTE]
42+
> You may see evidence of GitHub Actions running on the tab with the pull request opened! The image below shows a line you might see on your pull request after the Action finishes running.
43+
>
44+
> ![screenshot of an example of an actions line](/images/Actions-to-step-4.png)
+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<!--
2+
<<< Author notes: Step 4 >>>
3+
Just a historic note: The previous version of this step required responding
4+
to a pull request review before merging. The previous version also handled
5+
if users accidentally closed without merging.
6+
-->
7+
8+
## Step 4: Merge your pull request
9+
10+
_Nicely done! :sunglasses:_
11+
12+
You successfully created a pull request. You can now merge your pull request.
13+
14+
**What is a merge?**: A _[merge](https://docs.github.com/en/get-started/quickstart/github-glossary#merge)_ adds the changes in your pull request and branch into the `main` branch. For more information about merges, see "[Merging a pull request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/merging-a-pull-request)."
15+
16+
As noted in the previous step, you may have seen evidence of GitHub Actions running which automatically progresses your instructions to the next step. You'll have to wait for it to finish before you can merge your pull request. It will be ready when the merge pull request button is green.
17+
18+
![screenshot of green merge pull request button](/images/Green-merge-pull-request.png)
19+
20+
### :keyboard: Activity: Merge the pull request
21+
22+
1. Click **Merge pull request**.
23+
2. Click **Confirm merge**.
24+
3. Once your branch has been merged, you don't need it anymore. To delete this branch, click **Delete branch**.
25+
26+
![screenshot showing delete branch button](/images/delete-branch.png)
27+
28+
4. Wait about 20 seconds then refresh this page (the one you're following instructions from). [GitHub Actions](https://docs.github.com/en/actions) will automatically update to the next step.
29+
30+
> [!NOTE]
31+
> Check out the **Finish** step to see what you can learn next!

‎.github/steps/X-finish.md

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<!--
2+
<<< Author notes: Finish >>>
3+
Review what we learned, ask for feedback, provide next steps.
4+
-->
5+
6+
## Finish
7+
8+
_Congratulations, you've completed this course and joined the world of developers!_
9+
10+
<img src=https://octodex.github.com/images/collabocats.jpg alt=celebrate width=300 align=right>
11+
12+
Here's a recap of your accomplishments:
13+
14+
- You learned about GitHub, repositories, branches, commits, and pull requests.
15+
- You created a branch, a commit, and a pull request.
16+
- You merged a pull request.
17+
- You made your first contribution! :tada:
18+
19+
### What's next?
20+
21+
If you'd like to make a profile README, use the quickstart instructions below or follow the instructions in the [Managing your profile README](https://docs.github.com/account-and-profile/setting-up-and-managing-your-github-profile/customizing-your-profile/managing-your-profile-readme) article.
22+
23+
1. Make a new public repository with a name that matches your GitHub username.
24+
2. Create a file named `README.md` in its root. The "root" means not inside any folder in your repository.
25+
3. Edit the contents of the `README.md` file.
26+
4. If you created a new branch for your file, open and merge a pull request on your branch.
27+
5. Lastly, we'd love to hear what you thought of this course [in our discussion board](https://github.com/orgs/skills/discussions/categories/introduction-to-github).
28+
29+
Check out these resources to learn more or get involved:
30+
31+
- Are you a student? Check out the [Student Developer Pack](https://education.github.com/pack).
32+
- [Take another GitHub Skills course](https://github.com/skills).
33+
- [Read the GitHub Getting Started docs](https://docs.github.com/en/get-started).
34+
- To find projects to contribute to, check out [GitHub Explore](https://github.com/explore).

‎.github/workflows/0-welcome.yml

+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: Step 0, Welcome
2+
3+
# This step triggers after the learner creates a new repository from the template.
4+
# This workflow updates from step 0 to step 1.
5+
6+
# This will run every time we create push a commit to `main`.
7+
# Reference: https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows
8+
on:
9+
workflow_dispatch:
10+
push:
11+
branches:
12+
- main
13+
14+
# Reference: https://docs.github.com/en/actions/security-guides/automatic-token-authentication
15+
permissions:
16+
# Need `contents: read` to checkout the repository.
17+
# Need `contents: write` to update the step metadata.
18+
contents: write
19+
20+
jobs:
21+
# Get the current step to only run the main job when the learner is on the same step.
22+
get_current_step:
23+
name: Check current step number
24+
runs-on: ubuntu-latest
25+
steps:
26+
- name: Checkout
27+
uses: actions/checkout@v4
28+
- id: get_step
29+
run: |
30+
echo "current_step=$(cat ./.github/steps/-step.txt)" >> $GITHUB_OUTPUT
31+
outputs:
32+
current_step: ${{ steps.get_step.outputs.current_step }}
33+
34+
on_welcome:
35+
name: On welcome
36+
needs: get_current_step
37+
38+
# We will only run this action when:
39+
# 1. This repository isn't the template repository.
40+
# 2. The step is currently 0.
41+
# Reference: https://docs.github.com/en/actions/learn-github-actions/contexts
42+
# Reference: https://docs.github.com/en/actions/learn-github-actions/expressions
43+
if: >-
44+
${{ !github.event.repository.is_template
45+
&& needs.get_current_step.outputs.current_step == 0 }}
46+
47+
# We'll run Ubuntu for performance instead of Mac or Windows.
48+
runs-on: ubuntu-latest
49+
50+
steps:
51+
# We'll need to check out the repository so that we can edit README.md.
52+
- name: Checkout
53+
uses: actions/checkout@v4
54+
with:
55+
fetch-depth: 0 # Let's get all the branches.
56+
57+
# In README.md, switch step 0 for step 1.
58+
- name: Update to step 1
59+
uses: skills/action-update-step@v2
60+
with:
61+
token: ${{ secrets.GITHUB_TOKEN }}
62+
from_step: 0
63+
to_step: 1
64+
branch_name: my-first-branch
+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: Step 1, Create a branch
2+
3+
# This step listens for the learner to create branch `my-first-branch`.
4+
# This workflow updates from step 1 to step 2.
5+
6+
# This will run every time we create a branch or tag.
7+
# Reference: https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows
8+
on:
9+
workflow_dispatch:
10+
create:
11+
12+
# Reference: https://docs.github.com/en/actions/security-guides/automatic-token-authentication
13+
permissions:
14+
# Need `contents: read` to checkout the repository.
15+
# Need `contents: write` to update the step metadata.
16+
contents: write
17+
18+
jobs:
19+
# Get the current step to only run the main job when the learner is on the same step.
20+
get_current_step:
21+
name: Check current step number
22+
runs-on: ubuntu-latest
23+
steps:
24+
- name: Checkout
25+
uses: actions/checkout@v4
26+
- id: get_step
27+
run: |
28+
echo "current_step=$(cat ./.github/steps/-step.txt)" >> $GITHUB_OUTPUT
29+
outputs:
30+
current_step: ${{ steps.get_step.outputs.current_step }}
31+
32+
on_create_a_branch:
33+
name: On create a branch
34+
needs: get_current_step
35+
36+
# We will only run this action when:
37+
# 1. This repository isn't the template repository.
38+
# 2. The step is currently 1.
39+
# 3. The event is a branch.
40+
# 4. The branch name is `my-first-branch`.
41+
# Reference: https://docs.github.com/en/actions/learn-github-actions/contexts
42+
# Reference: https://docs.github.com/en/actions/learn-github-actions/expressions
43+
if: >-
44+
${{ !github.event.repository.is_template
45+
&& needs.get_current_step.outputs.current_step == 1
46+
&& github.ref_type == 'branch'
47+
&& github.ref_name == 'my-first-branch' }}
48+
49+
# We'll run Ubuntu for performance instead of Mac or Windows.
50+
runs-on: ubuntu-latest
51+
52+
steps:
53+
# We'll need to check out the repository so that we can edit the README.
54+
- name: Checkout
55+
uses: actions/checkout@v4
56+
with:
57+
fetch-depth: 0 # Let's get all the branches.
58+
59+
# In README.md, switch step 1 for step 2.
60+
- name: Update to step 2
61+
uses: skills/action-update-step@v2
62+
with:
63+
token: ${{ secrets.GITHUB_TOKEN }}
64+
from_step: 1
65+
to_step: 2
66+
branch_name: my-first-branch

‎.github/workflows/2-commit-a-file.yml

+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: Step 2, Commit a file
2+
3+
# This step listens for the learner to commit a file to branch `my-first-branch`.
4+
# This workflow updates from step 2 to step 3.
5+
6+
# This action will run every time there's a push to `my-first-branch`.
7+
# Reference: https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows
8+
on:
9+
workflow_dispatch:
10+
push:
11+
branches:
12+
- my-first-branch
13+
14+
# Reference: https://docs.github.com/en/actions/security-guides/automatic-token-authentication
15+
permissions:
16+
# Need `contents: read` to checkout the repository.
17+
# Need `contents: write` to update the step metadata.
18+
contents: write
19+
20+
jobs:
21+
# Get the current step to only run the main job when the learner is on the same step.
22+
get_current_step:
23+
name: Check current step number
24+
runs-on: ubuntu-latest
25+
steps:
26+
- name: Checkout
27+
uses: actions/checkout@v4
28+
- id: get_step
29+
run: |
30+
echo "current_step=$(cat ./.github/steps/-step.txt)" >> $GITHUB_OUTPUT
31+
outputs:
32+
current_step: ${{ steps.get_step.outputs.current_step }}
33+
34+
on_commit_a_file:
35+
name: On commit a file
36+
needs: get_current_step
37+
38+
# We will only run this action when:
39+
# 1. This repository isn't the template repository.
40+
# 2. The step is currently 2.
41+
# Reference: https://docs.github.com/en/actions/learn-github-actions/contexts
42+
# Reference: https://docs.github.com/en/actions/learn-github-actions/expressions
43+
if: >-
44+
${{ !github.event.repository.is_template
45+
&& needs.get_current_step.outputs.current_step == 2 }}
46+
47+
# We'll run Ubuntu for performance instead of Mac or Windows.
48+
runs-on: ubuntu-latest
49+
50+
steps:
51+
# We'll need to check out the repository so that we can edit the README.
52+
- name: Checkout
53+
uses: actions/checkout@v4
54+
with:
55+
fetch-depth: 0 # Let's get all the branches.
56+
57+
# In README.md, switch step 2 for step 3.
58+
- name: Update to step 3
59+
uses: skills/action-update-step@v2
60+
with:
61+
token: ${{ secrets.GITHUB_TOKEN }}
62+
from_step: 2
63+
to_step: 3
64+
branch_name: my-first-branch
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: Step 3, Open a pull request
2+
3+
# This step listens for the learner to open a pull request with branch `my-first-branch`.
4+
# This workflow updates from step 3 to step 4.
5+
6+
# This will run every time we create a branch or tag.
7+
# Reference: https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows
8+
on:
9+
workflow_dispatch:
10+
pull_request:
11+
types:
12+
- opened
13+
- reopened
14+
15+
# Reference: https://docs.github.com/en/actions/security-guides/automatic-token-authentication
16+
permissions:
17+
# Need `contents: read` to checkout the repository.
18+
# Need `contents: write` to update the step metadata.
19+
contents: write
20+
21+
jobs:
22+
# Get the current step to only run the main job when the learner is on the same step.
23+
get_current_step:
24+
name: Check current step number
25+
runs-on: ubuntu-latest
26+
steps:
27+
- name: Checkout
28+
uses: actions/checkout@v4
29+
- id: get_step
30+
run: |
31+
echo "current_step=$(cat ./.github/steps/-step.txt)" >> $GITHUB_OUTPUT
32+
outputs:
33+
current_step: ${{ steps.get_step.outputs.current_step }}
34+
35+
on_open_a_pull_request:
36+
name: On open a pull request
37+
needs: get_current_step
38+
39+
# We will only run this action when:
40+
# 1. This repository isn't the template repository.
41+
# 2. The step is currently 3.
42+
# 3. The head branch name is `my-first-branch`.
43+
# Reference: https://docs.github.com/en/actions/learn-github-actions/contexts
44+
# Reference: https://docs.github.com/en/actions/learn-github-actions/expressions
45+
if: >-
46+
${{ !github.event.repository.is_template
47+
&& needs.get_current_step.outputs.current_step == 3
48+
&& github.head_ref == 'my-first-branch' }}
49+
50+
# We'll run Ubuntu for performance instead of Mac or Windows.
51+
runs-on: ubuntu-latest
52+
53+
steps:
54+
# We'll need to check out the repository so that we can edit the README.
55+
- name: Checkout
56+
uses: actions/checkout@v4
57+
with:
58+
fetch-depth: 0 # Let's get all the branches.
59+
ref: my-first-branch # Important, as normally `pull_request` event won't grab other branches.
60+
61+
# In README.md, switch step 3 for step 4.
62+
- name: Update to step 4
63+
uses: skills/action-update-step@v2
64+
with:
65+
token: ${{ secrets.GITHUB_TOKEN }}
66+
from_step: 3
67+
to_step: 4
68+
branch_name: my-first-branch
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: Step 4, Merge your pull request
2+
3+
# This step listens for the learner to merge a pull request with branch `my-first-branch`.
4+
# This workflow updates from step 4 to step X.
5+
6+
# This will run every time we create push a commit to `main`.
7+
# Reference: https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows
8+
on:
9+
workflow_dispatch:
10+
push:
11+
branches:
12+
- main
13+
14+
# Reference: https://docs.github.com/en/actions/security-guides/automatic-token-authentication
15+
permissions:
16+
# Need `contents: read` to checkout the repository.
17+
# Need `contents: write` to update the step metadata.
18+
contents: write
19+
20+
jobs:
21+
# Get the current step to only run the main job when the learner is on the same step.
22+
get_current_step:
23+
name: Check current step number
24+
runs-on: ubuntu-latest
25+
steps:
26+
- name: Checkout
27+
uses: actions/checkout@v4
28+
- id: get_step
29+
run: |
30+
echo "current_step=$(cat ./.github/steps/-step.txt)" >> $GITHUB_OUTPUT
31+
outputs:
32+
current_step: ${{ steps.get_step.outputs.current_step }}
33+
34+
on_merge_your_pull_request:
35+
name: On merge your pull request
36+
needs: get_current_step
37+
38+
# We will only run this action when:
39+
# 1. This repository isn't the template repository.
40+
# 2. The step is currently 4.
41+
# Reference: https://docs.github.com/en/actions/learn-github-actions/contexts
42+
# Reference: https://docs.github.com/en/actions/learn-github-actions/expressions
43+
if: >-
44+
${{ !github.event.repository.is_template
45+
&& needs.get_current_step.outputs.current_step == 4 }}
46+
47+
# We'll run Ubuntu for performance instead of Mac or Windows.
48+
runs-on: ubuntu-latest
49+
50+
steps:
51+
# We'll need to check out the repository so that we can edit the README.
52+
- name: Checkout
53+
uses: actions/checkout@v4
54+
with:
55+
fetch-depth: 0 # Let's get all the branches.
56+
57+
# In README.md, switch step 4 for step X.
58+
- name: Update to step X
59+
uses: skills/action-update-step@v2
60+
with:
61+
token: ${{ secrets.GITHUB_TOKEN }}
62+
from_step: 4
63+
to_step: X
64+
branch_name: my-first-branch

‎.gitignore

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Compiled source #
2+
###################
3+
*.com
4+
*.class
5+
*.dll
6+
*.exe
7+
*.o
8+
*.so
9+
10+
# Packages #
11+
############
12+
# it's better to unpack these files and commit the raw source
13+
# git has its own built in compression methods
14+
*.7z
15+
*.dmg
16+
*.gz
17+
*.iso
18+
*.jar
19+
*.rar
20+
*.tar
21+
*.zip
22+
23+
# Logs and databases #
24+
######################
25+
*.log
26+
*.sql
27+
*.sqlite
28+
29+
# OS generated files #
30+
######################
31+
.DS_Store
32+
.DS_Store?
33+
._*
34+
.Spotlight-V100
35+
.Trashes
36+
ehthumbs.db
37+
Thumbs.db

‎LICENSE

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Copyright (c) GitHub, Inc.
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4+
5+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6+
7+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

‎README.md

+74
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
<header>
2+
3+
<!--
4+
<<< Author notes: Course header >>>
5+
Include a 1280×640 image, course title in sentence case, and a concise description in emphasis.
6+
In your repository settings: enable template repository, add your 1280×640 social image, auto delete head branches.
7+
Add your open source license, GitHub uses MIT license.
8+
-->
9+
10+
# Introduction to GitHub
11+
12+
_Get started using GitHub in less than an hour._
13+
14+
</header>
15+
16+
<!--
17+
<<< Author notes: Course start >>>
18+
Include start button, a note about Actions minutes,
19+
and tell the learner why they should take the course.
20+
-->
21+
22+
## Welcome
23+
24+
People use GitHub to build some of the most advanced technologies in the world. Whether you’re visualizing data or building a new game, there’s a whole community and set of tools on GitHub that can help you do it even better. GitHub Skills’ “Introduction to GitHub” course guides you through everything you need to start contributing in less than an hour.
25+
26+
- **Who is this for**: New developers, new GitHub users, and students.
27+
- **What you'll learn**: We'll introduce repositories, branches, commits, and pull requests.
28+
- **What you'll build**: We'll make a short Markdown file you can use as your [profile README](https://docs.github.com/account-and-profile/setting-up-and-managing-your-github-profile/customizing-your-profile/managing-your-profile-readme).
29+
- **Prerequisites**: None. This course is a great introduction for your first day on GitHub.
30+
- **How long**: This course takes less than one hour to complete.
31+
32+
In this course, you will:
33+
34+
1. Create a branch
35+
2. Commit a file
36+
3. Open a pull request
37+
4. Merge your pull request
38+
39+
### How to start this course
40+
41+
<!-- For start course, run in JavaScript:
42+
'https://github.com/new?' + new URLSearchParams({
43+
template_owner: 'skills',
44+
template_name: 'introduction-to-github',
45+
owner: '@me',
46+
name: 'skills-introduction-to-github',
47+
description: 'My clone repository',
48+
visibility: 'public',
49+
}).toString()
50+
-->
51+
52+
[![start-course](https://user-images.githubusercontent.com/1221423/235727646-4a590299-ffe5-480d-8cd5-8194ea184546.svg)](https://github.com/new?template_owner=skills&template_name=introduction-to-github&owner=%40me&name=skills-introduction-to-github&description=My+clone+repository&visibility=public)
53+
54+
1. Right-click **Start course** and open the link in a new tab.
55+
2. In the new tab, most of the prompts will automatically fill in for you.
56+
- For owner, choose your personal account or an organization to host the repository.
57+
- We recommend creating a public repository, as private repositories will [use Actions minutes](https://docs.github.com/en/billing/managing-billing-for-github-actions/about-billing-for-github-actions).
58+
- Scroll down and click the **Create repository** button at the bottom of the form.
59+
3. After your new repository is created, wait about 20 seconds, then refresh the page. Follow the step-by-step instructions in the new repository's README.
60+
61+
<footer>
62+
63+
<!--
64+
<<< Author notes: Footer >>>
65+
Add a link to get support, GitHub status page, code of conduct, license link.
66+
-->
67+
68+
---
69+
70+
Get help: [Post in our discussion board](https://github.com/orgs/skills/discussions/categories/introduction-to-github) &bull; [Review the GitHub status page](https://www.githubstatus.com/)
71+
72+
&copy; 2024 GitHub &bull; [Code of Conduct](https://www.contributor-covenant.org/version/2/1/code_of_conduct/code_of_conduct.md) &bull; [MIT License](https://gh.io/mit)
73+
74+
</footer>

‎images/Actions-to-step-4.png

9 KB
Loading

‎images/Green-merge-pull-request.png

60.8 KB
Loading

‎images/Pull-request-description.png

54.3 KB
Loading

‎images/code-tab.png

54.8 KB
Loading

‎images/commit-full-screen.png

107 KB
Loading

‎images/compare-and-pull-request.png

86.3 KB
Loading

‎images/create-branch-button.png

37.3 KB
Loading

‎images/create-new-file.png

23.7 KB
Loading

‎images/create-new-repository.png

109 KB
Loading

‎images/delete-branch.png

41 KB
Loading

‎images/main-branch-dropdown.png

37.3 KB
Loading

‎images/my-profile-file.png

30.1 KB
Loading

‎images/profile-readme-example.png

160 KB
Loading

‎images/pull-request-branches.png

25.6 KB
Loading

0 commit comments

Comments
 (0)
Please sign in to comment.