Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions .github/dependabot.yml

This file was deleted.

1 change: 0 additions & 1 deletion .github/steps/-step.txt

This file was deleted.

1 change: 0 additions & 1 deletion .github/steps/0-welcome.md

This file was deleted.

64 changes: 40 additions & 24 deletions .github/steps/1-create-a-branch.md
Original file line number Diff line number Diff line change
@@ -1,45 +1,61 @@
<!--
<<< Author notes: Step 1 >>>
Choose 3-5 steps for your course.
The first step is always the hardest, so pick something easy!
Link to docs.github.com for further explanations.
Encourage users to open new tabs for steps!
-->

## Step 1: Create a branch

_Welcome to "Introduction to GitHub"! :wave:_

**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.
<br>:tv: [Video: What is GitHub?](https://www.youtube.com/watch?v=pBy1zgt0XPc)
**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.

:tv: [Video: What is GitHub?](https://www.youtube.com/watch?v=pBy1zgt0XPc)

**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.
**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.

**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.
**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.

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)".
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)".

**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)".
**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)".

![profile-readme-example](/images/profile-readme-example.png)
![screenshot showing an example profile readme](https://github.com/user-attachments/assets/9425d1aa-04ba-459b-b89d-31fbae87c743)

### :keyboard: Activity: Your first branch

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.
1. Open a new browser tab and navigate to your newly made repository (your copy of this exercise). Then, work on the steps in your second tab while you read the instructions in this tab.

2. Navigate to the **< > Code** tab in the header menu of your repository.

![code-tab](/images/code-tab.png)
![screenshot highlighting the code tab](https://github.com/user-attachments/assets/8e1283ea-9cea-4a7e-8359-a7617734ff9a)

3. Click on the **main** branch drop-down.

![main-branch-dropdown](/images/main-branch-dropdown.png)
<img width="300" alt="screenshot highlighting the branch selection" src="https://github.com/user-attachments/assets/1a07c958-cebf-4ca5-805e-22c1725635ba">

4. In the text box **Find or create a branch...**, enter `my-first-branch`.

> **Note:** This is checked to continue with the next step. :wink:

5. Click the text **Create branch: `my-first-branch` from main** to create your branch.

<img width="300" alt="screenshot highlighting the create branch prompt" src="https://github.com/user-attachments/assets/99d19ff5-4482-4210-ae45-84e7b7c47632">

- The branch will automatically switch to the one you just created.
- The **main** branch drop-down menu will display your new branch name.

6. Now that your branch is pushed to GitHub, Mona should already be busy checking your work. Give her a moment and keep watch in the comments. You will see her respond with progress info and the next lesson.

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.
5. Click **Create branch: my-first-branch** to create your branch.

![create-branch-button](/images/create-branch-button.png)
<details>
<summary>Having trouble? 🤷</summary><br/>

The branch will automatically switch to the one you have just created.
The **main** branch drop-down bar will reflect your new branch and display the new branch name.
If you don't get feedback, here are some things to check:
- Make sure your created the branch with the exact name `my-first-branch`. No prefixes or suffixes.

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.
</details>
37 changes: 23 additions & 14 deletions .github/steps/2-commit-a-file.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
<!--
<<< Author notes: Step 2 >>>
Start this step by acknowledging the previous step.
Define terms and link to docs.github.com.
-->

## Step 2: Commit a file

_You created a branch! :tada:_
Expand All @@ -14,16 +8,16 @@ Creating a branch allows you to edit your project without changing the `main` br

### :keyboard: Activity: Your first commit

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.
The following steps will guide you through the process of committing a change on GitHub. A commit records changes to the project such as adding/removing/renaming files and modifying file content. For this exercise, committing a change will be adding a new file to your new branch.

> [!NOTE]
> `.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.
> `.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 Exercise.

1. On the **< > Code** tab in the header menu of your repository, make sure you're on your new branch `my-first-branch`.

2. Select the **Add file** drop-down and click **Create new file**.

![create new file option](/images/create-new-file.png)
<img width="300" alt="screenshot of the create new file option" src="https://github.com/user-attachments/assets/cfb062cd-be60-4f12-948c-0946a6fe01da">

3. In the **Name your file...** field, enter `PROFILE.md`.

Expand All @@ -33,11 +27,26 @@ The following steps will guide you through the process of committing a change on
Welcome to my GitHub profile!
```

![profile.md file screenshot](/images/my-profile-file.png)
![screenshot for adding the profile.md file](https://github.com/user-attachments/assets/e00540be-4334-4d0d-adc2-9893b5477a91)

5. Click **Commit changes...** in the upper right corner above the contents box. A dialog will appear.

6. GitHub offers a simple default message, but let's change it slightly for practice. Enter `Add PROFILE.md` in the **Commit message** field.

- A **commit message** and optional **extended description** help provide clarity for your changes. This is particularly useful when your commit involves several files.

<img width="400" alt="screenshot of adding a new file with a commit message" src="https://github.com/user-attachments/assets/6ab299ce-8039-4734-a707-d7c3cd7077a0">

6. In this lesson, we'll ignore the other fields for now and click **Commit changes**.

7. Now that you've changed a file, Mona should already be busy checking your work. Give her a moment and keep watch in the comments. You will see her respond with progress info and the next lesson.


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".
<details>
<summary>Having trouble? 🤷</summary><br/>

![screenshot of adding a new file with a commit message](/images/commit-full-screen.png)
If you don't get feedback, here are some things to check:
- Make sure you are on the `my-first-branch` branch.
- Ensure the `PROFILE.md` file is created and in the root folder.

6. In this lesson, we'll ignore the other fields and click **Commit changes**.
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.
</details>
52 changes: 27 additions & 25 deletions .github/steps/3-open-a-pull-request.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
<!--
<<< Author notes: Step 3 >>>
Just a historic note: the previous version of this step forced the learner
to write a pull request description,
checked that `main` was the receiving branch,
and that the file was named correctly.
-->

## Step 3: Open a pull request

_Nice work making that commit! :sparkles:_
Expand All @@ -18,27 +10,37 @@ Now that you have made a change to the project and created a commit, it’s time

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**.

![screenshot of message and button](/images/compare-and-pull-request.png)
![screenshot of message and button](https://github.com/user-attachments/assets/47b82c6e-d45b-4854-b8b4-1cb2c33af05f)

To create a pull request automatically, click **Compare & pull request** button, and then skip to step 5 below. Alternately, you practice creating it manually using the first 4 steps.

1. In the header menu of your repository, click the **Pull requests** tab .
2. Click the **New pull request** button.
3. Select the following branches using the dropdown menus.

- **base:** `main`
- **compare:** `my-first-branch`

![screenshot showing both branch selections](https://github.com/user-attachments/assets/140ca348-b6de-4c3c-b29f-fd57944d98a9)

4. Click **Create pull request**.

5. 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`.

6. The next field helps you provide a **description** of the changes you made. Please enter a short description of what you’ve accomplished so far. As a reminder, you have: created a new branch, created a file, and made a commit.

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.
![screenshot showing pull request](https://github.com/user-attachments/assets/e03171f9-98cc-4067-a473-78424618f1f8)

1. Click on the **Pull requests** tab in the header menu of your repository.
2. Click **New pull request**.
3. In the **base:** dropdown, make sure **main** is selected.
4. Select the **compare:** dropdown, and click `my-first-branch`.
7. Click **Create pull request**.

![screenshot showing both branch selections](/images/pull-request-branches.png)
8. Now that you've started a place to collaborate, Mona should already be busy checking your work. Give her a moment and keep watch in the comments. You will see her respond with progress info and the next lesson.

5. Click **Create pull request**.
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`.
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.

![screenshot showing pull request](/images/Pull-request-description.png)
<details>
<summary>Having trouble? 🤷</summary><br/>

8. Click **Create pull request**. You will automatically be navigated to your new pull request.
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.
If you don't get feedback, here are some things to check:
- Make sure your pull request title is correct.
- Ensure your pull request has a description.

> [!NOTE]
> 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.
>
> ![screenshot of an example of an actions line](/images/Actions-to-step-4.png)
</details>
32 changes: 17 additions & 15 deletions .github/steps/4-merge-your-pull-request.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,33 @@
<!--
<<< Author notes: Step 4 >>>
Just a historic note: The previous version of this step required responding
to a pull request review before merging. The previous version also handled
if users accidentally closed without merging.
-->

## Step 4: Merge your pull request

_Nicely done! :sunglasses:_

You successfully created a pull request. You can now merge your pull request.
You successfully created a pull request. Now it's time merge it!

**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)."

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.

![screenshot of green merge pull request button](/images/Green-merge-pull-request.png)
![screenshot of green merge pull request button](https://github.com/user-attachments/assets/ce2f04cb-8a71-411f-8dc8-827a2bc23a30)

### :keyboard: Activity: Merge the pull request

1. Click **Merge pull request**.

> **Note:** You may see workflows running on your new pull request, causing the merge button to be inactive. Just wait a moment for them to finish and the merge button will activate.

2. Click **Confirm merge**.

> **Tip:** Did you notice this dialog looks similar to adding a file? A merge is also a kind of commit!

3. Once your branch has been merged, you don't need it anymore. To delete this branch, click **Delete branch**.

![screenshot showing delete branch button](/images/delete-branch.png)
![screenshot showing delete branch button](https://github.com/user-attachments/assets/0fda948e-14e0-4643-aa53-d9f9f364cddd)

4. Now that your work is merged, Mona will confirm and share some final review content. Nice work! 🎉

<details>
<summary>Having trouble? 🤷</summary><br/>

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.
If you don't get feedback, here are some things to check:
- Make sure you completed the previous lessons. If they haven't passed, the merge button will be gray.

> [!NOTE]
> Check out the **Finish** step to see what you can learn next!
</details>
Loading