Repository: skills/introduction-to-github
Branch: main
Commit: a5269948846e
Files: 13
Total size: 29.7 KB
Directory structure:
gitextract_dget2zrs/
├── .github/
│ ├── steps/
│ │ ├── 1-create-a-branch.md
│ │ ├── 2-commit-a-file.md
│ │ ├── 3-open-a-pull-request.md
│ │ ├── 4-merge-your-pull-request.md
│ │ └── x-review.md
│ └── workflows/
│ ├── 0-start-exercise.yml
│ ├── 1-create-a-branch.yml
│ ├── 2-commit-a-file.yml
│ ├── 3-open-a-pull-request.yml
│ └── 4-merge-your-pull-request.yml
├── .gitignore
├── LICENSE
└── README.md
================================================
FILE CONTENTS
================================================
================================================
FILE: .github/steps/1-create-a-branch.md
================================================
## 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.
: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 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)".
**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)".

### :keyboard: Activity: Your first branch
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.

3. Click on the **main** branch drop-down.
<img width="300" alt="screenshot highlighting the branch selection" src="../images/branch-selection-dropdown.png">
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="../images/create-branch-prompt.png">
- 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.
<details>
<summary>Having trouble? 🤷</summary><br/>
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.
</details>
================================================
FILE: .github/steps/2-commit-a-file.md
================================================
## Step 2: Commit a file
_You created a branch! :tada:_
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 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)".
### :keyboard: Activity: Your first commit
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 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**.
<img width="300" alt="screenshot of the create new file option" src="../images/create-new-file-option.png">
3. In the **Name your file...** field, enter `PROFILE.md`.
4. In the **Enter file contents here** area, copy the following content to your file:
```
Welcome to my GitHub profile!
```

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="../images/commit-message-dialog.png">
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.
<details>
<summary>Having trouble? 🤷</summary><br/>
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.
</details>
================================================
FILE: .github/steps/3-open-a-pull-request.md
================================================
## Step 3: Open a pull request
_Nice work making that commit! :sparkles:_
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 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: Create a pull request
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**.

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`

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.

7. Click **Create pull request**.
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.
<details>
<summary>Having trouble? 🤷</summary><br/>
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.
</details>
================================================
FILE: .github/steps/4-merge-your-pull-request.md
================================================
## Step 4: Merge your pull request
_Nicely done! :sunglasses:_
You successfully created a pull request. Now it's time to 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)."

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

4. Now that your work is merged, Mona will confirm and share some final review content. Nice work! 🎉
<details>
<summary>Having trouble? 🤷</summary><br/>
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.
</details>
================================================
FILE: .github/steps/x-review.md
================================================
## Review
_Congratulations, you've completed this Exercise and joined the world of developers!_
<img src=https://octodex.github.com/images/collabocats.jpg alt=celebrate width=300 align=right>
Here's a recap of your accomplishments:
- You learned about GitHub, repositories, branches, commits, and pull requests.
- You created a branch, a commit, and a pull request.
- You merged a pull request.
- You made your first contribution! :tada:
### What's next?
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.
1. Make a new public repository with a name that matches your GitHub username.
2. Create a file named `README.md` in its root. The "root" means not inside any folder in your repository.
3. Edit the contents of the `README.md` file.
4. If you created a new branch for your file, open and merge a pull request on your branch.
5. Lastly, we'd love to hear what you thought of this exercise [in our discussion board](https://github.com/orgs/skills/discussions/categories/introduction-to-github).
Check out these resources to learn more or get involved:
- Are you a student? Check out the [Student Developer Pack](https://education.github.com/pack).
- [Take another GitHub Skills exercise](https://learn.github.com/skills).
- [Read the GitHub Getting Started docs](https://docs.github.com/en/get-started).
- To find projects to contribute to, check out [GitHub Explore](https://github.com/explore).
================================================
FILE: .github/workflows/0-start-exercise.yml
================================================
name: Step 0 # Start Exercise
on:
push:
branches:
- main
permissions:
contents: write # Update Readme
actions: write # Disable/enable workflows
issues: write # Create issue and comment on issues
env:
STEP_1_FILE: ".github/steps/1-create-a-branch.md"
jobs:
start_exercise:
if: |
!github.event.repository.is_template
name: Start Exercise
uses: skills/exercise-toolkit/.github/workflows/start-exercise.yml@v0.8.1
with:
exercise-title: "Introduction to GitHub"
intro-message: "If you are new to GitHub, you might find your fellow developers use ___**issues**___ to organize their work and collaborate. We will do the same! That's another lesson, but today, we will introduce you to the basics."
post_next_step_content:
name: Post next step content
runs-on: ubuntu-latest
needs: [start_exercise]
env:
ISSUE_REPOSITORY: ${{ github.repository }}
ISSUE_NUMBER: ${{ needs.start_exercise.outputs.issue-number }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: main
- name: Get response templates
uses: actions/checkout@v4
with:
repository: skills/exercise-toolkit
path: exercise-toolkit
ref: v0.7.0
- name: Create comment - add step content
uses: GrantBirki/comment@v2.1.1
with:
repository: ${{ env.ISSUE_REPOSITORY }}
issue-number: ${{ env.ISSUE_NUMBER }}
file: ${{ env.STEP_1_FILE }}
- name: Create comment - watching for progress
uses: GrantBirki/comment@v2.1.1
with:
repository: ${{ env.ISSUE_REPOSITORY }}
issue-number: ${{ env.ISSUE_NUMBER }}
file: exercise-toolkit/markdown-templates/step-feedback/watching-for-progress.md
- name: Disable current workflow and enable next one
run: |
gh workflow enable "Step 1"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
================================================
FILE: .github/workflows/1-create-a-branch.yml
================================================
name: Step 1 # Create a branch
# Checks if the learner completed tasks for step 1.
# - Triggers when the user creates a new branch 'my-first-branch'.
# - Checks that the branch name is 'my-first-branch'.
# - If all checks pass, the workflow is disabled so it doesn't run again. As such, workflow status badge will change to green.
on:
push:
branches:
- "my-first-branch"
permissions:
contents: read
actions: write
issues: write
env:
STEP_2_FILE: ".github/steps/2-commit-a-file.md"
jobs:
find_exercise:
name: Find Exercise Issue
uses: skills/exercise-toolkit/.github/workflows/find-exercise-issue.yml@v0.7.0
post_next_step_content:
name: Post next step content
needs: [find_exercise]
runs-on: ubuntu-latest
env:
ISSUE_REPOSITORY: ${{ github.repository }}
ISSUE_NUMBER: ${{ needs.find_exercise.outputs.issue-number }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get response templates
uses: actions/checkout@v4
with:
repository: skills/exercise-toolkit
path: exercise-toolkit
ref: v0.7.0
- name: Create comment - step finished
uses: GrantBirki/comment@v2.1.1
with:
repository: ${{ env.ISSUE_REPOSITORY }}
issue-number: ${{ env.ISSUE_NUMBER }}
file: exercise-toolkit/markdown-templates/step-feedback/step-finished-prepare-next-step.md
vars: |
next_step_number: 2
- name: Create comment - add step content
uses: GrantBirki/comment@v2.1.1
with:
repository: ${{ env.ISSUE_REPOSITORY }}
issue-number: ${{ env.ISSUE_NUMBER }}
file: ${{ env.STEP_2_FILE }}
- name: Create comment - watching for progress
uses: GrantBirki/comment@v2.1.1
with:
repository: ${{ env.ISSUE_REPOSITORY }}
issue-number: ${{ env.ISSUE_NUMBER }}
file: exercise-toolkit/markdown-templates/step-feedback/watching-for-progress.md
- name: Disable current workflow and enable next one
run: |
gh workflow disable "${{github.workflow}}"
gh workflow enable "Step 2"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
================================================
FILE: .github/workflows/2-commit-a-file.yml
================================================
name: Step 2 # Commit a file
# Checks if the learner completed tasks for step 2.
# - Triggers when the user makes a push to the branch 'my-first-branch' and modifies the file 'PROFILE.md'.
on:
push:
branches:
- "my-first-branch"
paths:
- "PROFILE.md"
permissions:
contents: read
actions: write
issues: write
env:
STEP_3_FILE: ".github/steps/3-open-a-pull-request.md"
jobs:
find_exercise:
name: Find Exercise Issue
uses: skills/exercise-toolkit/.github/workflows/find-exercise-issue.yml@v0.7.0
post_next_step_content:
name: Post next step content
needs: [find_exercise]
runs-on: ubuntu-latest
env:
ISSUE_REPOSITORY: ${{ github.repository }}
ISSUE_NUMBER: ${{ needs.find_exercise.outputs.issue-number }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get response templates
uses: actions/checkout@v4
with:
repository: skills/exercise-toolkit
path: exercise-toolkit
ref: v0.7.0
- name: Create comment - step finished
uses: GrantBirki/comment@v2.1.1
with:
issue-number: ${{ env.ISSUE_NUMBER }}
repository: ${{ env.ISSUE_REPOSITORY }}
file: exercise-toolkit/markdown-templates/step-feedback/step-finished-prepare-next-step.md
vars: |
next_step_number: 3
- name: Create comment - add step content
uses: GrantBirki/comment@v2.1.1
with:
repository: ${{ env.ISSUE_REPOSITORY }}
issue-number: ${{ env.ISSUE_NUMBER }}
file: ${{ env.STEP_3_FILE }}
- name: Create comment - watching for progress
uses: GrantBirki/comment@v2.1.1
with:
repository: ${{ env.ISSUE_REPOSITORY }}
issue-number: ${{ env.ISSUE_NUMBER }}
file: exercise-toolkit/markdown-templates/step-feedback/watching-for-progress.md
- name: Disable current workflow and enable next one
run: |
gh workflow disable "${{github.workflow}}"
gh workflow enable "Step 3"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
================================================
FILE: .github/workflows/3-open-a-pull-request.yml
================================================
name: Step 3 # Open a pull request
# Checks if the learner completed tasks for step 3.
# - Triggers when the user creates or edits the pull request.
# - Checks the pull request title and description. Adds a PR comment.
# - If all checks pass, the workflow is disabled so it doesn't run again. As such, workflow status badge will change to green.
on:
pull_request:
branches:
- main
types:
- opened
- synchronize
- reopened
- edited
permissions:
contents: read
actions: write
issues: write
env:
STEP_4_FILE: ".github/steps/4-merge-your-pull-request.md"
jobs:
find_exercise:
if: |
!github.event.repository.is_template &&
github.head_ref == 'my-first-branch'
name: Find Exercise Issue
uses: skills/exercise-toolkit/.github/workflows/find-exercise-issue.yml@v0.7.0
check_step_work:
name: Check step work
runs-on: ubuntu-latest
needs: find_exercise
env:
ISSUE_REPOSITORY: ${{ github.repository }}
ISSUE_NUMBER: ${{ needs.find_exercise.outputs.issue-number }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get response templates
uses: actions/checkout@v4
with:
repository: skills/exercise-toolkit
path: exercise-toolkit
ref: v0.7.0
- name: Find last comment
id: find-last-comment
uses: peter-evans/find-comment@v3
with:
repository: ${{ env.ISSUE_REPOSITORY }}
issue-number: ${{ env.ISSUE_NUMBER }}
direction: last
- name: Update comment - checking work
uses: GrantBirki/comment@v2.1.1
with:
repository: ${{ env.ISSUE_REPOSITORY }}
issue-number: ${{ env.ISSUE_NUMBER }}
comment-id: ${{ steps.find-last-comment.outputs.comment-id }}
file: exercise-toolkit/markdown-templates/step-feedback/checking-work.md
edit-mode: replace
# START: Check practical exercise
- name: Check PR title for keyphrase
id: check-pr-title
continue-on-error: true
uses: skills/action-keyphrase-checker@v1
with:
keyphrase: "Add my first file"
text: ${{ github.event.pull_request.title }}
case-sensitive: false
- name: Check PR description is non-empty
id: check-pr-description
continue-on-error: true
run: |
if [ -n "$PR_BODY" ]; then
echo "STEP_MESSAGE=Pull request description" >> $GITHUB_OUTPUT
else
echo "STEP_MESSAGE=Pull request description is empty" >> $GITHUB_OUTPUT
exit 1
fi
env:
PR_BODY: ${{ github.event.pull_request.body }}
- name: Update comment - step results
uses: GrantBirki/comment@v2.1.1
with:
repository: ${{ env.ISSUE_REPOSITORY }}
issue-number: ${{ env.ISSUE_NUMBER }}
comment-id: ${{ steps.find-last-comment.outputs.comment-id }}
file: exercise-toolkit/markdown-templates/step-feedback/step-results-table.md
edit-mode: replace
vars: |
step_number: 3
results_table:
- description: "Pull Request title matches"
passed: ${{ steps.check-pr-title.outcome == 'success' }}
- description: ${{ steps.check-pr-description.outputs.STEP_MESSAGE }}
passed: ${{ steps.check-pr-description.outcome == 'success' }}
- name: Fail job if not all checks passed
if: contains(steps.*.outcome, 'failure')
run: exit 1
post_next_step_content:
name: Post next step content
needs: [find_exercise, check_step_work]
runs-on: ubuntu-latest
env:
ISSUE_REPOSITORY: ${{ github.repository }}
ISSUE_NUMBER: ${{ needs.find_exercise.outputs.issue-number }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get response templates
uses: actions/checkout@v4
with:
repository: skills/exercise-toolkit
path: exercise-toolkit
ref: v0.7.0
- name: Create comment - step finished
uses: GrantBirki/comment@v2.1.1
with:
repository: ${{ env.ISSUE_REPOSITORY }}
issue-number: ${{ env.ISSUE_NUMBER }}
file: exercise-toolkit/markdown-templates/step-feedback/step-finished-prepare-next-step.md
vars: |
next_step_number: 4
- name: Create comment - add step content
uses: GrantBirki/comment@v2.1.1
with:
repository: ${{ env.ISSUE_REPOSITORY }}
issue-number: ${{ env.ISSUE_NUMBER }}
file: ${{ env.STEP_4_FILE }}
- name: Create comment - watching for progress
uses: GrantBirki/comment@v2.1.1
with:
repository: ${{ env.ISSUE_REPOSITORY }}
issue-number: ${{ env.ISSUE_NUMBER }}
file: exercise-toolkit/markdown-templates/step-feedback/watching-for-progress.md
- name: Disable current workflow and enable next one
run: |
gh workflow disable "${{github.workflow}}"
gh workflow enable "Step 4"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
================================================
FILE: .github/workflows/4-merge-your-pull-request.yml
================================================
name: Step 4 # Merge your pull request
# Checks if the learner completed tasks for step 4.
# - Triggers when the user merges the pull request.
# - If all checks pass, the workflow is disabled so it doesn't run again. As such, workflow status badge will change to green.
on:
pull_request:
branches:
- main
types:
- closed
permissions:
contents: write
actions: write
issues: write
env:
REVIEW_FILE: ".github/steps/x-review.md"
jobs:
find_exercise:
name: Find Exercise Issue
uses: skills/exercise-toolkit/.github/workflows/find-exercise-issue.yml@v0.5.0
post_review_content:
name: Post review content
needs: [find_exercise]
runs-on: ubuntu-latest
if: |
!github.event.repository.is_template
env:
ISSUE_REPOSITORY: ${{ github.repository }}
ISSUE_NUMBER: ${{ needs.find_exercise.outputs.issue-number }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get response templates
uses: actions/checkout@v4
with:
repository: skills/exercise-toolkit
path: exercise-toolkit
ref: v0.7.0
- name: Create comment - step finished
uses: GrantBirki/comment@v2.1.1
with:
repository: ${{ env.ISSUE_REPOSITORY }}
issue-number: ${{ env.ISSUE_NUMBER }}
file: exercise-toolkit/markdown-templates/step-feedback/lesson-review.md
- name: Create comment - add review content
uses: GrantBirki/comment@v2.1.1
with:
repository: ${{ env.ISSUE_REPOSITORY }}
issue-number: ${{ env.ISSUE_NUMBER }}
file: ${{ env.REVIEW_FILE }}
- name: Disable current workflow
run: gh workflow disable "${{github.workflow}}"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
finish_exercise:
name: Finish Exercise
needs: [find_exercise, post_review_content]
uses: skills/exercise-toolkit/.github/workflows/finish-exercise.yml@v0.7.0
with:
issue-url: ${{ needs.find_exercise.outputs.issue-url }}
exercise-title: "Introduction to GitHub"
================================================
FILE: .gitignore
================================================
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
############
# it's better to unpack these files and commit the raw source
# git has its own built in compression methods
*.7z
*.dmg
*.gz
*.iso
*.jar
*.rar
*.tar
*.zip
# Logs and databases #
######################
*.log
*.sql
*.sqlite
# OS generated files #
######################
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db
================================================
FILE: LICENSE
================================================
Copyright (c) GitHub, Inc.
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:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
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.
================================================
FILE: README.md
================================================
# Introduction to GitHub
_Get started using GitHub in less than an hour._
## Welcome
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” exercise guides you through everything you need to start contributing in less than an hour.
- **Who is this for**: New developers, new GitHub users, and students.
- **What you'll learn**: We'll introduce repositories, branches, commits, and pull requests.
- **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).
- **Prerequisites**: None. This exercise is a great introduction for your first day on GitHub.
- **How long**: This exercise takes less than one hour to complete.
In this exercise, you will:
1. Create a branch
2. Commit a file
3. Open a pull request
4. Merge your pull request
### How to start this exercise
Simply copy the exercise to your account, then give your favorite Octocat (Mona) **about 20 seconds** to prepare the first lesson, then **refresh the page**.
[](https://github.com/new?template_owner=skills&template_name=introduction-to-github&owner=%40me&name=skills-introduction-to-github&description=Exercise:+Introduction+to+GitHub&visibility=public)
<details>
<summary>Having trouble? 🤷</summary><br/>
When copying the exercise, we recommend the following settings:
- For owner, choose your personal account or an organization to host the repository.
- We recommend creating a public repository, since private repositories will use Actions minutes.
If the exercise isn't ready in 20 seconds, please check the [Actions](../../actions) tab.
- Check to see if a job is running. Sometimes it simply takes a bit longer.
- If the page shows a failed job, please submit an issue. Nice, you found a bug! 🐛
</details>
---
© 2025 GitHub • [Code of Conduct](https://www.contributor-covenant.org/version/2/1/code_of_conduct/code_of_conduct.md) • [MIT License](https://gh.io/mit)
gitextract_dget2zrs/ ├── .github/ │ ├── steps/ │ │ ├── 1-create-a-branch.md │ │ ├── 2-commit-a-file.md │ │ ├── 3-open-a-pull-request.md │ │ ├── 4-merge-your-pull-request.md │ │ └── x-review.md │ └── workflows/ │ ├── 0-start-exercise.yml │ ├── 1-create-a-branch.yml │ ├── 2-commit-a-file.yml │ ├── 3-open-a-pull-request.yml │ └── 4-merge-your-pull-request.yml ├── .gitignore ├── LICENSE └── README.md
Condensed preview — 13 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (32K chars).
[
{
"path": ".github/steps/1-create-a-branch.md",
"chars": 3850,
"preview": "## Step 1: Create a branch\n\n_Welcome to \"Introduction to GitHub\"! :wave:_\n\n**What is GitHub?**: GitHub is a collaboratio"
},
{
"path": ".github/steps/2-commit-a-file.md",
"chars": 3056,
"preview": "## Step 2: Commit a file\n\n_You created a branch! :tada:_\n\nCreating a branch allows you to edit your project without chan"
},
{
"path": ".github/steps/3-open-a-pull-request.md",
"chars": 2697,
"preview": "## Step 3: Open a pull request\n\n_Nice work making that commit! :sparkles:_\n\nNow that you have made a change to the proje"
},
{
"path": ".github/steps/4-merge-your-pull-request.md",
"chars": 1544,
"preview": "## Step 4: Merge your pull request\n\n_Nicely done! :sunglasses:_\n\nYou successfully created a pull request. Now it's time "
},
{
"path": ".github/steps/x-review.md",
"chars": 1653,
"preview": "## Review\n\n_Congratulations, you've completed this Exercise and joined the world of developers!_\n\n<img src=https://octod"
},
{
"path": ".github/workflows/0-start-exercise.yml",
"chars": 1995,
"preview": "name: Step 0 # Start Exercise\n\non:\n push:\n branches:\n - main\n\npermissions:\n contents: write # Update Readme\n "
},
{
"path": ".github/workflows/1-create-a-branch.yml",
"chars": 2251,
"preview": "name: Step 1 # Create a branch\n\n# Checks if the learner completed tasks for step 1.\n# - Triggers when the user creates a"
},
{
"path": ".github/workflows/2-commit-a-file.yml",
"chars": 2147,
"preview": "name: Step 2 # Commit a file\n\n# Checks if the learner completed tasks for step 2.\n# - Triggers when the user makes a pus"
},
{
"path": ".github/workflows/3-open-a-pull-request.yml",
"chars": 5217,
"preview": "name: Step 3 # Open a pull request\n\n# Checks if the learner completed tasks for step 3.\n# - Triggers when the user creat"
},
{
"path": ".github/workflows/4-merge-your-pull-request.yml",
"chars": 2111,
"preview": "name: Step 4 # Merge your pull request\n\n# Checks if the learner completed tasks for step 4.\n# - Triggers when the user m"
},
{
"path": ".gitignore",
"chars": 444,
"preview": "# Compiled source #\n###################\n*.com\n*.class\n*.dll\n*.exe\n*.o\n*.so\n\n# Packages #\n############\n# it's better to u"
},
{
"path": "LICENSE",
"chars": 1051,
"preview": "Copyright (c) GitHub, Inc.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this softwar"
},
{
"path": "README.md",
"chars": 2375,
"preview": "# Introduction to GitHub\n\n_Get started using GitHub in less than an hour._\n\n## Welcome\n\nPeople use GitHub to build some "
}
]
About this extraction
This page contains the full source code of the skills/introduction-to-github GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 13 files (29.7 KB), approximately 7.7k tokens. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.