Skip to content

Exercise: Introduction to GitHub #1

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

Closed
github-actions bot opened this issue May 4, 2025 · 11 comments
Closed

Exercise: Introduction to GitHub #1

github-actions bot opened this issue May 4, 2025 · 11 comments

Comments

@github-actions
Copy link
Contributor

github-actions bot commented May 4, 2025

Introduction to GitHub

original github octocat

👋 Hey there jeremyanugrah! Welcome to your Skills exercise!

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.

As you complete each step, I will respond in the comments to:

  • check your work and give feedback
  • share next steps
  • occasionally share tips
  • congratulate you when you finish!

Good luck and have fun!
- Mona

Copy link
Contributor Author

github-actions bot commented May 4, 2025

Step 1: Create a branch

Welcome to "Introduction to GitHub"! 👋

What is GitHub?: GitHub is a collaboration platform that uses Git for versioning.
GitHub is a popular place to share and contribute to open-source software.

📺 Video: What is GitHub?

What is a repository?: A repository is a project containing files and folders.
A repository tracks versions of files and folders. For more information, see
"About repositories" from GitHub Docs.

What is a branch?: A 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".

What is a profile README?: A 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".

screenshot showing an example profile readme

⌨️ 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.

    screenshot highlighting the code tab

  3. Click on the main branch drop-down.

    screenshot highlighting the branch selection
  4. In the text box Find or create a branch..., enter my-first-branch.

    Note: This is checked to continue with the next step. 😉

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

    screenshot highlighting the create branch prompt
    • 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.

Having trouble? 🤷

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.

Copy link
Contributor Author

github-actions bot commented May 4, 2025

🎉🎉🎉 Nice work! Everything is perfect! 🎉🎉🎉
Preparing content for step 2! One moment... 🤓

Copy link
Contributor Author

github-actions bot commented May 5, 2025

Step 2: Commit a file

You created a branch! 🎉

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

⌨️ 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" in our docs or by taking the "Communicating 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.

    screenshot of the create new file option
  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!
    

    screenshot for adding the profile.md file

  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.
    screenshot of adding a new file with a commit message
  7. In this lesson, we'll ignore the other fields for now and click Commit changes.

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

Having trouble? 🤷

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.

Copy link
Contributor Author

github-actions bot commented May 5, 2025

🎉🎉🎉 Nice work! Everything is perfect! 🎉🎉🎉
Preparing content for step 3! One moment... 🤓

Copy link
Contributor Author

github-actions bot commented May 6, 2025

Step 3: Open a pull request

Nice work making that 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 pull request?: Collaboration happens on a 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".

⌨️ 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.

screenshot of message and button

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

  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.

    screenshot showing pull request

  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.

Having trouble? 🤷

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.

Copy link
Contributor Author

github-actions bot commented May 6, 2025

Step 3 - Passed ✅

Status Name Message
✅ - Pass Pull request title
✅ - Pass Pull request description

Tips

  • Issues are for capturing a problem/idea and possible solutions.
  • Pull requests are for active development and getting feedback.

Copy link
Contributor Author

github-actions bot commented May 7, 2025

🎉🎉🎉 Nice work! Everything is perfect! 🎉🎉🎉
Preparing content for step 4! One moment... 🤓

Copy link
Contributor Author

github-actions bot commented May 7, 2025

Step 4: Merge your pull request

Nicely done! 😎

You successfully created a pull request. Now it's time to merge it!

What is a merge?: A merge adds the changes in your pull request and branch into the main branch. For more information about merges, see "Merging a pull request."

screenshot of green merge pull request button

⌨️ 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

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

Having trouble? 🤷

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.

Copy link
Contributor Author

github-actions bot commented May 7, 2025

🎉🎉🎉 Nice work! Everything is perfect! 🎉🎉🎉
Now, let's do a quick review!

Copy link
Contributor Author

github-actions bot commented May 7, 2025

Review

Congratulations, you've completed this Exercise and joined the world of developers!

celebrate

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! 🎉

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

Check out these resources to learn more or get involved:

Copy link
Contributor Author

github-actions bot commented May 7, 2025

Congratulations jeremyanugrah! You finished the exercise! 🎉🎉🎉

We've updated the repository with a couple changes to highlight your success!

Return to the repository home page to see your progress!

@github-actions github-actions bot closed this as completed May 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants