Exercise: Introduction To GitHub
Introduction to GitHub

Welcome to Your Skills Exercise!
👋 Hey there MilenaFernanda24! Welcome to your Skills exercise! If you're 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:
- Version control: GitHub allows developers to track changes to their codebase over time, making it easier to identify and fix errors.
- Collaboration: GitHub enables multiple developers to work on the same project simultaneously, making it easier to collaborate and share code.
- Open-source: GitHub provides a platform for open-source projects, allowing developers to share their code with others and collaborate on a global scale.
Getting Started with GitHub
To get started with GitHub, you'll need to create an account and set up your profile. Here's a step-by-step guide:
- Create an account: Go to the GitHub website and sign up for an account. You can use your email address or social media accounts to create an account.
- Set up your profile: Once you've created an account, set up your profile by adding a profile picture, bio, and other relevant information.
- Create a new repository: A repository is a container for your code. To create a new repository, click on the "+" button in the top-right corner of the GitHub dashboard and select "New repository".
- Add a README file: A README file is a text file that provides information about your project. To add a README file, click on the "README" button in the repository settings and select "Create a new file".
Understanding GitHub Terminology
To get the most out of GitHub, it's essential to understand the terminology used by the platform. Here are some key terms to get you started:
- Repository: A repository is a container for your code.
- Branch: A branch is a separate version of your code. You can use branches to experiment with new features or fix bugs without affecting the main codebase.
- Commit: A commit is a snapshot of your code at a particular point in time. You can use commits to track changes to your codebase.
- Pull request: A pull request is a request to merge changes from one branch into another. You can use pull requests to collaborate with others and review changes to your codebase.
Exercise: Create a New Repository
Now it's your turn to create a new repository on GitHub! Follow these steps:
- Create a new repository: Go to the GitHub dashboard and click on the "+" button in the top-right corner. Select "New repository" and enter a name for your repository.
- Add a README file: Click on the "README" button in the repository settings and select "Create a new file". Add a brief description of your project and any relevant information.
- Commit your changes: Click on the "Commit" button to save your changes.
Conclusion
Congratulations on completing the first exercise! You've now created a new repository on GitHub and added a README file. In the next exercise, we'll explore how to use issues to organize your work and collaborate with others.
What's Next?
In the next exercise, we'll cover the following topics:
- Issues: We'll learn how to use issues to organize our work and collaborate with others.
- Collaboration: We'll explore how to collaborate with others on a project using GitHub.
- Open-source: We'll learn how to contribute to open-source projects on GitHub.
Introduction
GitHub is a powerful platform for version control and collaboration on software development projects. However, with its many features and terminology, it can be overwhelming for beginners. In this article, we'll answer some of the most frequently asked questions about GitHub to help you get started.
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 in a centralized location, making it easier to collaborate with others and track changes to the codebase.
Q: What is the difference between GitHub and Git?
A: Git is a version control system that allows developers to track changes to their codebase. GitHub is a web-based platform that provides a user-friendly interface for using Git. Think of GitHub as a social network for developers, where you can share your code and collaborate with others.
Q: How do I create a new repository on GitHub?
A: To create a new repository on GitHub, follow these steps:
- Go to the GitHub dashboard and click on the "+" button in the top-right corner.
- Select "New repository" and enter a name for your repository.
- Choose a repository type (public or private) and select a license.
- Click on the "Create repository" button.
Q: What is a README file?
A: A README file is a text file that provides information about your project. It's a great way to introduce your project to others and provide context for your code.
Q: How do I add a README file to my repository?
A: To add a README file to your repository, follow these steps:
- Go to your repository settings and click on the "README" button.
- Select "Create a new file" and enter a name for your README file.
- Add a brief description of your project and any relevant information.
- Click on the "Commit" button to save your changes.
Q: What is a branch?
A: A branch is a separate version of your code. You can use branches to experiment with new features or fix bugs without affecting the main codebase.
Q: How do I create a new branch?
A: To create a new branch, follow these steps:
- Go to your repository settings and click on the "Branches" tab.
- Select "New branch" and enter a name for your branch.
- Choose a base branch (e.g. "master") and select a branch type (e.g. "feature").
- Click on the "Create branch" button.
Q: What is a pull request?
A: A pull request is a request to merge changes from one branch into another. You can use pull requests to collaborate with others and review changes to your codebase.
Q: How do I create a pull request?
A: To create a pull request, follow these steps:
- Go to your repository settings and click on the "Pull requests" tab.
- Select "New pull request" and choose a base branch (e.g. "master") and a head branch (e.g. "feature").
- Review the changes and add a comment if necessary.
- Click on the "Create pull request" button.
Q: What is an issue?
A: An issue is a way to track and manage bugs or tasks in your project. You can use issues to collaborate with others and keep track of progress.
Q: How do I create an issue?
A: To create an issue, follow these steps:
- Go to your repository settings and click on the "Issues" tab.
- Select "New issue" and enter a title and description for your issue.
- Choose a label (e.g. "bug") and assign a priority (e.g. "high").
- Click on the "Create issue" button.
Q: What is a fork?
A: A fork is a copy of a repository that you can use to make changes and experiment with new features.
Q: How do I fork a repository?
A: To fork a repository, follow these steps:
- Go to the repository you want to fork and click on the "Fork" button.
- Choose a repository name and select a branch (e.g. "master").
- Click on the "Fork" button to create a new repository.
Q: What is a clone?
A: A clone is a copy of a repository that you can use to work on your project locally.
Q: How do I clone a repository?
A: To clone a repository, follow these steps:
- Go to the repository you want to clone and click on the "Clone or download" button.
- Copy the clone URL and open a terminal or command prompt.
- Run the command
git clone <clone URL>
to clone the repository.
Conclusion
GitHub is a powerful platform for version control and collaboration on software development projects. By understanding the basics of GitHub and its terminology, you can take your coding skills to the next level. We hope this Q&A article has helped you get started with GitHub and answered some of your most frequently asked questions.