From eba6eca9ba61abea91bd8968aa5a5a9021e3dfac Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <github-actions[bot]@users.noreply.github.com> Date: Fri, 27 Dec 2024 04:07:27 +0000 Subject: [PATCH 1/4] Update to 2 in STEP and README.md --- .github/steps/-step.txt | 2 +- README.md | 50 ++++++++++++++++++++--------------------- 2 files changed, 25 insertions(+), 27 deletions(-) diff --git a/.github/steps/-step.txt b/.github/steps/-step.txt index d00491f..0cfbf08 100644 --- a/.github/steps/-step.txt +++ b/.github/steps/-step.txt @@ -1 +1 @@ -1 +2 diff --git a/README.md b/README.md index f3029e6..17b21d6 100644 --- a/README.md +++ b/README.md @@ -14,50 +14,48 @@ _Get started using GitHub in less than an hour._ </header> <!-- - <<< 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! + <<< Author notes: Step 2 >>> + Start this step by acknowledging the previous step. + Define terms and link to docs.github.com. --> -## Step 1: Create a branch +## Step 2: Commit a file -_Welcome to "Introduction to GitHub"! :wave:_ +_You created a branch! :tada:_ -**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) +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! -**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 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)". -**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. +### :keyboard: Activity: Your first commit -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)". +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. -**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)". +> [!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. - +1. On the **< > Code** tab in the header menu of your repository, make sure you're on your new branch `my-first-branch`. -### :keyboard: Activity: Your first branch +2. Select the **Add file** drop-down and click **Create new file**. -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. -2. Navigate to the **< > Code** tab in the header menu of your repository. +  -  +3. In the **Name your file...** field, enter `PROFILE.md`. -3. Click on the **main** branch drop-down. +4. In the **Enter file contents here** area, copy the following content to your file: -  + ``` + Welcome to my GitHub profile! + ``` -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. +  -  +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". - 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. +  -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. +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. <footer> From 41c46041bce7e829209b1036ebcd004344b26c96 Mon Sep 17 00:00:00 2001 From: kalwilson <kalwilson.dev@gmail.com> Date: Thu, 26 Dec 2024 20:11:51 -0800 Subject: [PATCH 2/4] Create PROFILE.md --- PROFILE.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 PROFILE.md diff --git a/PROFILE.md b/PROFILE.md new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/PROFILE.md @@ -0,0 +1 @@ + From fd3d250036786fcab4a021ac3c54c665c6dab38b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <github-actions[bot]@users.noreply.github.com> Date: Fri, 27 Dec 2024 04:12:09 +0000 Subject: [PATCH 3/4] Update to 3 in STEP and README.md --- .github/steps/-step.txt | 2 +- README.md | 55 +++++++++++++++++++++-------------------- 2 files changed, 29 insertions(+), 28 deletions(-) diff --git a/.github/steps/-step.txt b/.github/steps/-step.txt index 0cfbf08..00750ed 100644 --- a/.github/steps/-step.txt +++ b/.github/steps/-step.txt @@ -1 +1 @@ -2 +3 diff --git a/README.md b/README.md index 17b21d6..8e8d761 100644 --- a/README.md +++ b/README.md @@ -14,48 +14,49 @@ _Get started using GitHub in less than an hour._ </header> <!-- - <<< Author notes: Step 2 >>> - Start this step by acknowledging the previous step. - Define terms and link to docs.github.com. + <<< 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 2: Commit a file +## Step 3: Open a pull request -_You created a branch! :tada:_ +_Nice work making that commit! :sparkles:_ -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! +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! -**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)". +**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)". -### :keyboard: Activity: Your first commit +### :keyboard: Activity: Create a pull request -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. +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**. -> [!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. - -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**. + -  +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. -3. In the **Name your file...** field, enter `PROFILE.md`. +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`. -4. In the **Enter file contents here** area, copy the following content to your file: +  - ``` - Welcome to my GitHub profile! - ``` +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. -  +  -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". +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. -  - -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. +> [!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. +> +>  <footer> From c165c02f81b9bc01f294c44c4aa1a103d40c6f30 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <github-actions[bot]@users.noreply.github.com> Date: Fri, 27 Dec 2024 05:25:10 +0000 Subject: [PATCH 4/4] Update to 4 in STEP and README.md --- .github/steps/-step.txt | 2 +- README.md | 47 +++++++++++++++-------------------------- 2 files changed, 18 insertions(+), 31 deletions(-) diff --git a/.github/steps/-step.txt b/.github/steps/-step.txt index 00750ed..b8626c4 100644 --- a/.github/steps/-step.txt +++ b/.github/steps/-step.txt @@ -1 +1 @@ -3 +4 diff --git a/README.md b/README.md index 8e8d761..dc25df2 100644 --- a/README.md +++ b/README.md @@ -14,49 +14,36 @@ _Get started using GitHub in less than an hour._ </header> <!-- - <<< 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. + <<< 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 3: Open a pull request +## Step 4: Merge your pull request -_Nice work making that commit! :sparkles:_ +_Nicely done! :sunglasses:_ -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! +You successfully created a pull request. You can now merge your pull request. -**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)". +**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)." -### :keyboard: Activity: Create 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. -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**. + - +### :keyboard: Activity: Merge the pull request -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. +1. Click **Merge pull request**. +2. Click **Confirm merge**. +3. Once your branch has been merged, you don't need it anymore. To delete this branch, click **Delete branch**. -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`. +  -  - -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. - -  - -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. +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. > [!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. -> ->  +> Check out the **Finish** step to see what you can learn next! <footer>