Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add my first file #1

Merged
merged 3 commits into from
Oct 5, 2024
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
2 changes: 1 addition & 1 deletion .github/steps/-step.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2
4
48 changes: 18 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,48 +14,36 @@ _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 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 2: Commit a file
## Step 4: Merge your pull request

_You created a branch! :tada:_
_Nicely done! :sunglasses:_

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!
You successfully created a pull request. You can now merge your 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 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: Your first commit
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.

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.
![screenshot of green merge pull request button](/images/Green-merge-pull-request.png)

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

![create new file option](/images/create-new-file.png)
### :keyboard: Activity: Merge the pull request

3. In the **Name your file...** field, enter `PROFILE.md`.
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**.

4. In the **Enter file contents here** area, copy the following content to your file:
![screenshot showing delete branch button](/images/delete-branch.png)

```
Welcome to my GitHub profile!
```
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.

![profile.md file screenshot](/images/my-profile-file.png)

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

![screenshot of adding a new file with a commit message](/images/commit-full-screen.png)

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]
> Check out the **Finish** step to see what you can learn next!

<footer>

Expand Down
1 change: 1 addition & 0 deletions my-first-branch
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Welcome to my GitHub profile!