Exercise: Introduction To GitHub
Introduction to GitHub

Welcome to Your Skills Exercise!
👋 Hey there Southerncashew! 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.
What is GitHub?
GitHub is a web-based platform for version control and collaboration on software development projects. It allows developers to store and manage their code in a centralized location, making it easier to collaborate with others and track changes to the codebase. GitHub provides a range of features, including repositories, branches, and pull requests, which we will explore in this exercise.
Creating a GitHub Account
If you don't already have a GitHub account, you will need to create one before you can start using the platform. To create a GitHub account, follow these steps:
- Go to the GitHub website (www.github.com) and click on the "Sign up" button.
- Enter your email address, username, and password.
- Fill out the required information, including your name and location.
- Click on the "Create account" button.
Understanding GitHub Terminology
Before we dive into the exercise, let's take a look at some key GitHub terminology:
- Repository: A repository is a collection of files and folders that are stored on GitHub. It's like a digital file cabinet where you can store and manage your code.
- Branch: A branch is a separate version of your repository that allows you to work on different features or versions of your code without affecting the main codebase.
- Pull request: A pull request is a request to merge changes from one branch into another. It's a way to collaborate with others and review changes before they are merged into the main codebase.
Step 1: Creating a New Repository
Objective: Create a new repository on GitHub.
Instructions:
- Log in to your GitHub account.
- Click on the "+" button in the top right corner of the screen.
- Select "New repository" from the dropdown menu.
- Enter a name for your repository and a brief description.
- Choose a repository type (e.g., public, private, or internal).
- Click on the "Create repository" button.
What to Expect:
Once you create a new repository, you will see a list of files and folders in your repository. You can add files to your repository by clicking on the "Add file" button or by uploading a file from your computer.
Step 2: Creating a New Branch
Objective: Create a new branch in your repository.
Instructions:
- Navigate to your repository on GitHub.
- Click on the "Branch" dropdown menu.
- Select "New branch" from the menu.
- Enter a name for your branch (e.g., "feature/new-feature").
- Click on the "Create branch" button.
What to Expect:
Once create a new branch, you will see a list of branches in your repository. You can switch between branches by clicking on the branch name.
Step 3: Creating a New File
Objective: Create a new file in your repository.
Instructions:
- Navigate to your repository on GitHub.
- Click on the "Add file" button.
- Enter a name for your file (e.g., "README.md").
- Add some content to your file (e.g., a brief description of your project).
- Click on the "Commit new file" button.
What to Expect:
Once you create a new file, you will see the file listed in your repository. You can edit the file by clicking on the "Edit" button.
Conclusion
Congratulations! You have completed the introduction to GitHub exercise. You now know how to create a new repository, branch, and file on GitHub. In the next exercise, we will explore how to use issues to organize your work and collaborate with others.
What's Next?
In the next exercise, we will cover the following topics:
- Creating and managing issues
- Collaborating with others using pull requests
- Using labels and milestones to organize your work
Introduction
GitHub is a powerful platform for version control and collaboration on software development projects. However, with its many features and tools, it can be overwhelming for beginners. In this article, we will answer some of the most frequently asked questions about GitHub.
Q1: What is GitHub?
A: GitHub is a web-based platform for version control and collaboration on software development projects. It allows developers to store and manage their code in a centralized location, making it easier to collaborate with others and track changes to the codebase.
Q2: How do I create a GitHub account?
A: To create a GitHub account, follow these steps:
- Go to the GitHub website (www.github.com) and click on the "Sign up" button.
- Enter your email address, username, and password.
- Fill out the required information, including your name and location.
- Click on the "Create account" button.
Q3: What is a repository?
A: A repository is a collection of files and folders that are stored on GitHub. It's like a digital file cabinet where you can store and manage your code.
Q4: How do I create a new repository?
A: To create a new repository, follow these steps:
- Log in to your GitHub account.
- Click on the "+" button in the top right corner of the screen.
- Select "New repository" from the dropdown menu.
- Enter a name for your repository and a brief description.
- Choose a repository type (e.g., public, private, or internal).
- Click on the "Create repository" button.
Q5: What is a branch?
A: A branch is a separate version of your repository that allows you to work on different features or versions of your code without affecting the main codebase.
Q6: How do I create a new branch?
A: To create a new branch, follow these steps:
- Navigate to your repository on GitHub.
- Click on the "Branch" dropdown menu.
- Select "New branch" from the menu.
- Enter a name for your branch (e.g., "feature/new-feature").
- Click on the "Create branch" button.
Q7: What is a pull request?
A: A pull request is a request to merge changes from one branch into another. It's a way to collaborate with others and review changes before they are merged into the main codebase.
Q8: How do I create a pull request?
A: To create a pull request, follow these steps:
- Navigate to your repository on GitHub.
- Click on the "Pull requests" tab.
- Click on the "New pull request" button.
- Select the branch you want to merge into the main codebase.
- Click on the "Create pull request" button.
Q9: What is a label?
A: A label is a way to categorize and prioritize issues and pull requests. You can use labels to indicate the status of an issue or pull request, such as "in progress" or "resolved".
Q10: How do I use labels?
A: To use labels, follow these steps:
- Navigate to your repository on GitHub. 2 Click on the "Issues" tab.
- Click on the "Labels" dropdown menu.
- Select a label from the list.
- Click on the "Add label" button.
Q11: What is a milestone?
A: A milestone is a way to track progress and deadlines for a project. You can use milestones to indicate the completion of a specific task or feature.
Q12: How do I use milestones?
A: To use milestones, follow these steps:
- Navigate to your repository on GitHub.
- Click on the "Issues" tab.
- Click on the "Milestones" dropdown menu.
- Select a milestone from the list.
- Click on the "Add milestone" button.
Conclusion
We hope this Q&A article has helped you understand some of the most frequently asked questions about GitHub. Whether you're a beginner or an experienced developer, GitHub is a powerful tool that can help you collaborate with others and manage your codebase. If you have any more questions, feel free to ask!