Exercise: Introduction To GitHub
Introduction to GitHub

Welcome to Your Skills Exercise!
👋 Hey there, melrbrito! 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 repository, 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.
Creating a GitHub Account
To get started with GitHub, you need to create a GitHub account. Here's how:
- 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.
Creating a New Repository
Once you have created a GitHub account, you can create a new repository. Here's how:
- 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 or private).
- Click on the "Create repository" button.
Basic GitHub Concepts
Here are some basic GitHub concepts to get you started:
- Repository: A repository is a collection of files and folders that are stored on GitHub.
- Branch: A branch is a separate line of development in a repository.
- Commit: A commit is a snapshot of changes made to a repository.
- Pull request: A pull request is a request to merge changes from one branch into another.
Exercise: Create a New Repository
Now it's your turn to create a new repository on GitHub. Follow the steps outlined above to create a new repository. Make sure to include the following:
- A name for your repository
- A brief description of your repository
- A repository type (e.g., public or private)
What's Next?
Once you have created a new repository, you can start working on your project. Here are some next steps to consider:
- Create a new file: Create a new file in your repository and add some content.
- Make changes: Make some changes to your file and commit them.
- Create a new branch: Create a new branch in your repository and make some changes.
- Merge changes: Merge changes from one branch into another.
Conclusion
Congratulations on completing the first exercise in this series! You have now created a GitHub account, created a new repository, and learned some basic GitHub concepts. In the next exercise, we will explore how to create a new file, make changes, and commit them. Stay tuned!
Additional Resources
- GitHub documentation: https://docs.github.com
- GitHub tutorials: https://help.github.com/en/github/getting-started-with-github
- GitHub community: https://github.community
Exercise Feedback
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 in a centralized repository, 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 centralized repository for Git projects. In other words, Git is the tool that allows you to manage your code, and GitHub is the platform that hosts your code.
Q: How do I create a new repository on GitHub?
A: To create a new repository on GitHub, 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 or private).
- Click on the "Create repository" button.
Q: What is a branch in GitHub?
A: A branch is a separate line of development in a repository. It allows you to work on a new feature or fix a bug without affecting the main codebase. You can create a new branch, make changes, and then merge the changes back into the main branch.
Q: How do I create a new branch in GitHub?
A: To create a new branch in GitHub, follow these steps:
- Log in to your GitHub account.
- Navigate to your repository.
- Click on the "New branch" button.
- Enter a name for your branch.
- Click on the "Create branch" button.
Q: What is a commit in GitHub?
A: A commit is a snapshot of changes made to a repository. It allows you to track changes to your codebase over time. You can create a new commit by making changes to your code, adding a commit message, and then committing the changes.
Q: How do I create a new commit in GitHub?
A: To create a new commit in GitHub, follow these steps:
- Log in to your GitHub account.
- Navigate to your repository.
- Make changes to your code.
- Add a commit message.
- Click on the "Commit changes" button.
Q: What is a pull request in GitHub?
A: A pull request is a request to merge changes from one branch into another. It allows you to review and discuss changes before merging them into the main codebase.
Q: How do I create a new pull request in GitHub?
A: To create a new pull request in GitHub, follow these steps:
- Log in to your GitHub account.
- Navigate to your repository.
- Click on the "New pull request" button.
- Select the branch you want to merge into.
- Select the branch you want to merge from.
- Click on the "Create pull request" button.
Q: What is GitHub Pages?
A: Pages is a feature that allows you to host a website directly from your GitHub repository. It's a great way to showcase your project or portfolio.
Q: How do I create a GitHub Pages site?
A: To create a GitHub Pages site, follow these steps:
- Log in to your GitHub account.
- Navigate to your repository.
- Click on the "Settings" button.
- Scroll down to the "GitHub Pages" section.
- Click on the "Choose a theme" button.
- Select a theme for your site.
- Click on the "Save" button.
Additional Resources
- GitHub documentation: https://docs.github.com
- GitHub tutorials: https://help.github.com/en/github/getting-started-with-github
- GitHub community: https://github.community
Exercise Feedback
Please provide feedback on this Q&A article by commenting below. What did you find helpful? What did you find challenging? What would you like to see in future articles?