Exercise: Introduction To GitHub
Introduction to GitHub

Welcome to Your Skills Exercise!
👋 Hey there InvestKomi! 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, track changes, and collaborate with others on a project. GitHub provides a unique set of features that make it an essential tool for developers, including:
- Version control: GitHub allows developers to track changes to their code over time, making it easier to collaborate and manage different versions of a project.
- Collaboration: GitHub provides a platform for developers to work together on a project, including features like pull requests, code reviews, and issue tracking.
- Open-source: GitHub is home to millions of open-source projects, making it a great resource for developers to learn from and contribute to.
Getting Started with GitHub
To get started with GitHub, you will need to create an account. Here's a step-by-step guide:
- Create a GitHub account: Go to github.com and sign up for a new account. You can use your email address or your GitHub username and password to log in.
- Set up your profile: Once you have created your account, take some time to set up your profile. This includes adding a profile picture, bio, and other information that will help others get to know you.
- Explore GitHub: Take some time to explore GitHub and get familiar with its features. You can start by browsing through the GitHub repository, searching for projects, and exploring the different features and tools available.
GitHub Basics
Here are some basic concepts you should understand when using GitHub:
- Repository: A repository is a collection of files and folders that make up a project. You can think of it as a folder on your computer, but instead of being stored locally, it's stored on GitHub.
- Branch: A branch is a separate version of a repository. You can think of it as a copy of the repository that you can work on independently.
- Commit: A commit is a snapshot of your changes to a repository. You can think of it as a save point in your project.
- Pull request: A pull request is a request to merge changes from one branch into another. You can think of it as a way to ask someone to review and merge your changes.
Exercise: Create a New Repository
For this exercise, you will create a new repository on GitHub. Here's what you need to do:
- Create a new repository: Go to your GitHub account and click on the "+" button to create a new repository.
- Choose a name: Choose a name for your repository. This will be the name that appears in the GitHub repository list.
- **Add a description Add a description for your repository. This will help others understand what your project is about.
- Choose a license: Choose a license for your repository. This will determine how others can use and distribute your code.
- Create the repository: Click on the "Create repository" button to create your new repository.
Exercise: Create a New File
For this exercise, you will create a new file in your repository. Here's what you need to do:
- Navigate to your repository: Go to your repository on GitHub and click on the "Code" button.
- Create a new file: Click on the "+" button to create a new file.
- Choose a name: Choose a name for your file. This will be the name that appears in the repository list.
- Add content: Add content to your file. This can be anything from code to text.
- Commit the changes: Commit the changes to your file by clicking on the "Commit changes" button.
Conclusion
Congratulations! You have completed the introduction to GitHub exercise. You have learned the basics of GitHub, including creating a new repository, creating a new file, and committing changes. You have also learned how to use some of the basic features of GitHub, including version control and collaboration.
What's Next?
Frequently Asked Questions
Q: 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, track changes, and collaborate with others on a project.
Q: What is the difference between GitHub and Git?
A: Git is a version control system that allows developers to track changes to their code over time. GitHub is a web-based platform that provides a user-friendly interface for using Git. Think of Git as the underlying technology, and GitHub as the platform that makes it easy to use.
Q: How do I create a new repository on GitHub?
A: To create a new repository on GitHub, follow these steps:
- Go to your GitHub account and click on the "+" button to create a new repository.
- Choose a name for your repository.
- Add a description for your repository.
- Choose a license for your repository.
- Click on the "Create repository" button to create your new repository.
Q: How do I create a new file in my repository?
A: To create a new file in your repository, follow these steps:
- Go to your repository on GitHub and click on the "Code" button.
- Click on the "+" button to create a new file.
- Choose a name for your file.
- Add content to your file.
- Commit the changes to your file by clicking on the "Commit changes" button.
Q: What is a branch in GitHub?
A: A branch in GitHub is a separate version of a repository. You can think of it as a copy of the repository that you can work on independently. Branches are useful for testing new features or making changes to a project without affecting the main codebase.
Q: How do I create a new branch in GitHub?
A: To create a new branch in GitHub, follow these steps:
- Go to your repository on GitHub and click on the "Code" button.
- Click on the "New branch" button.
- Choose a name for your branch.
- Click on the "Create branch" button to create your new branch.
Q: What is a pull request in GitHub?
A: A pull request in GitHub is a request to merge changes from one branch into another. You can think of it as a way to ask someone to review and merge your changes.
Q: How do I create a pull request in GitHub?
A: To create a pull request in GitHub, follow these steps:
- Go to your repository on GitHub and click on the "Pull requests" tab.
- Click on the "New pull request" button.
- Choose the branch you want to merge into.
- Choose the branch you want to merge from.
- Click on the "Create pull request" button to create your pull request.
Q: What is an issue in GitHub?
A: An issue in GitHub is a way to track and manage bugs, feature requests, and other tasks related to a project. Issues are useful for keeping track of progress and communicating with team members.
**Q: How do I create an issue in GitHub?-----------------------------------------
A: To create an issue in GitHub, follow these steps:
- Go to your repository on GitHub and click on the "Issues" tab.
- Click on the "New issue" button.
- Choose a title for your issue.
- Add a description for your issue.
- Click on the "Create issue" button to create your issue.
Q: What is a commit in GitHub?
A: A commit in GitHub is a snapshot of your changes to a repository. You can think of it as a save point in your project.
Q: How do I commit changes to my repository?
A: To commit changes to your repository, follow these steps:
- Go to your repository on GitHub and click on the "Code" button.
- Make changes to your code.
- Click on the "Commit changes" button to commit your changes.
Q: What is a fork in GitHub?
A: A fork in GitHub is a copy of a repository that you can use to make changes and submit pull requests. Forks are useful for making changes to a project without affecting the original codebase.
Q: How do I fork a repository in GitHub?
A: To fork a repository in GitHub, follow these steps:
- Go to the repository you want to fork.
- Click on the "Fork" button.
- Choose a name for your fork.
- Click on the "Create fork" button to create your fork.
Conclusion
We hope this GitHub Q&A has been helpful in answering some of your questions about using GitHub. If you have any more questions or need further clarification on any of the topics covered, feel free to ask!