Get started using GitHub in less than an hour.
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. By default, your repository has one branch named main
and it is considered to be the definitive branch. You can create additional branches off of main
in your repository. You can use branches to have different versions of a project at one time.
On additional branches, you can make edits without impacting the main
version. Branches allow you to separate your work from the main
branch. In other words, everyone's work is safe while you contribute.
📺 Video: 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.
- Open a new browser tab, and navigate to this same repository. Then, work on the steps in your second tab while you read the instructions in this tab.
- Navigate to the Code tab.
- Click on the main branch drop-down.
- In the field, enter a name for your branch:
my-first-branch
. - Click Create branch: my-first-branch to create your branch.
- Move on to Step 2!
Note: If you made a public repository, and want to confirm you correctly set up your first branch, wait about 20 seconds then refresh this page (the one you're following instructions from). GitHub Actions will automatically close this step and open the next one.
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.
The following steps will guide you through the process of committing a change on GitHub. Committing a change requires first adding a new file to your new branch.
- On the Code tab, make sure you're on your new branch
my-first-branch
. - Select the Add file drop-down and click Create new file.
- In the Name your file... field, enter
PROFILE.md
. - In the Edit new file area, copy the following content to your file:
Welcome to my GitHub profile!
- For commits, you can enter a short commit message that describes wha