Skip to content

Get started using GitHub in less than an hour.

License

Notifications You must be signed in to change notification settings

luispujols/introduction-to-github

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Introduction to GitHub

This quick and fun introduction will get you started using GitHub in less than an hour.

⛳ Start

start-course

When you select Start course or Use this template, you will be prompted to create a new repository. We recommend creating a public repository, as private repositories will use Actions minutes.
Optional: For this course, set "owner" and "repository name" to your login name.
After you make your own repository, wait about 20 seconds and refresh. I will go to the next step.

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 Learn’s “Introduction to GitHub” course 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.
  • Prerequisites: None. This course is a great introduction for your first day on GitHub.
  • How long: This course is four steps long and takes less than one hour to complete.

🌲 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.
📺 Video: Exploring a repository

What is a branch?: A branch is a parallel version of your repository. You can make edits in your branch without impacting the main version. Branches allow us to separate our work from the main branch. In other words, everyone's work is safe while you contribute.
📺 Video: Branches

⌨️ Activity: Your first branch

  1. Open a new browser tab, and work on the steps in your second tab while you read the instructions in this tab.
  2. Navigate to the Code tab.
  3. Click Branch: main in the drop-down.
  4. In the field, enter a name for your branch: my-first-branch.
  5. Click Create branch: my-first-branch or press the Enter key to create your branch.
  6. Wait about 20 seconds then refresh this page for the next step.

📝 Step 2: Commit a file

You created a branch! 🎉

Creating a branch allows you to edit to 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.

⌨️ Activity: Your first commit

The following steps will guide you through the process of committing a change on GitHub.

  1. Create a new file on this branch called PROFILE.md.
    • Make sure you are on the "Code" tab.
    • In the branch drop-down, select my-first-branch.
    • Click Create new file.
    • In the "file name" field, type PROFILE.md.
  2. When you’re done naming the file, add the following content to your file:
    Welcome to my GitHub profile!
  3. After adding the text, you can commit the change by entering a brief commit message Add PROFILE.md in the text-entry field below the file edit view.
  4. After you’ve entered a commit message, click Commit new file.
  5. Wait about 20 seconds then refresh this page for the next step.

🙌 Step 3: Open a pull request

Nice work making that commit ✨

Now that you’ve 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. This pull request is going to keep the changes you just made on your branch and propose applying them to the main branch.
📺 Video: Introduction to pull requests

⌨️ Activity: Create a pull request

  1. Open a pull request:
    • From the "Pull requests" tab, click New pull request.
    • In the "base:" drop-down menu, make sure the "main" branch is selected.
    • In the "compare:" drop-down menu, select my-first-branch.
  2. When you’ve selected your branch, enter a title for your pull request: Add my first file.
  3. The next field helps you provide a description of the changes you made. Feel free to add a description of what you’ve accomplished so far. As a reminder, you have: created a branch, created a file and made a commit, and opened a pull request.
  4. Click Create pull request.
  5. Wait about 20 seconds then refresh this page for the next step.

:squirrel: Step 4: Merge your pull request

Nicely done friend! 😎

You successfully created a pull request. You can now merge your pull request.

What is a merge: A merge adds the changes in your pull request and branch into the main branch.
📺 Video: Understanding the GitHub flow

⌨️ Activity: Merge 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 and you may click Delete branch.
  4. Wait about 20 seconds then refresh this page for the next step.

🏁 Finish

Congratulations friend, you've completed this course!

celebrate

Here's a recap of all the tasks you've accomplished in your repository:

  • 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?


Get help: Post in our community forumReview the GitHub status page

© 2022 GitHub • Code of ConductCC-BY-4.0 License

About

Get started using GitHub in less than an hour.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published