# GitHub

> Source: Courseiva IT Certification Glossary — https://courseiva.com/glossary/github

## Quick definition

GitHub is a website where developers can save and manage their code projects. It keeps a history of every change made to the code, so you can go back to older versions if needed. Multiple people can work on the same project at the same time without messing up each other's work. It also lets you share your code with others or keep it private.

## Simple meaning

Think of GitHub as a Google Drive for code, but with superpowers. When you write a document in Google Drive, you can see who changed what and restore an old version if you make a mistake. GitHub does the same thing for computer code, but it is designed for teams of programmers. 

 Imagine you and your friends are writing a giant story together. Each person writes a chapter, but you all need to make sure the story makes sense. If one person rewrites chapter three while another person fixes chapter five, you need a way to combine those changes without losing anyone’s work. GitHub is the tool that helps you merge everyone’s changes safely. It keeps every single version of every file you have ever saved, so nothing is ever truly lost. 

 GitHub also makes it easy to share your code with the world. Many open-source projects live on GitHub, meaning anyone can look at the code, suggest improvements, or use it for their own projects. For IT professionals, GitHub is not just a storage place. It is a central hub where you manage code releases, track bugs, automate testing, and collaborate with colleagues across the globe. Learning to use GitHub is often one of the first practical skills a new developer or IT support specialist picks up, because almost every modern software project relies on it in some way.

## Technical definition

GitHub is a web-based hosting service for Git repositories. Git is a distributed version control system created by Linus Torvalds in 2005. Unlike older centralized systems where all code lived on one server, Git gives every developer a complete copy of the entire project history on their local machine. GitHub adds a remote, central location where these local copies synchronize. 

 Under the hood, GitHub uses the Git protocol for data transfer, typically over HTTPS or SSH. When you run git push, your local commits are sent to GitHub’s servers, which store them as objects in a compressed database. Each commit is identified by a SHA-1 hash, a 40-character hexadecimal string that uniquely represents the snapshot of your files at that moment. Branches are lightweight pointers to specific commits. The default branch is usually called main. 

 GitHub extends Git with collaboration features. Pull requests are the primary mechanism for code review. A developer creates a branch, makes changes, then opens a pull request to merge those changes into the main branch. Other team members can comment on specific lines of code, request changes, or approve the merge. GitHub Actions is a built-in CI/CD platform that can automatically run tests, build code, or deploy applications whenever code is pushed. 

 Security features include branch protection rules that prevent direct pushes to main, require pull request reviews, or enforce passing status checks. GitHub also supports two-factor authentication, SAML single sign-on, and secret scanning to prevent accidental exposure of API keys or passwords. Organizations can manage teams with granular permissions, controlling who can read, write, or administer repositories. 

 For IT professionals, GitHub integrates with issue tracking, project boards, and wikis. It is not uncommon for an entire software development lifecycle to be managed within GitHub, from initial feature request to deployment monitoring. Knowing how to navigate GitHub, resolve merge conflicts, and use GitHub Actions is often tested in general IT certification exams that cover DevOps practices.

## Real-life example

Imagine you and three friends are building a large Lego castle together. Each of you is working on a different tower. You have a big table where you keep the main castle, and each of you has a small tray where you build your tower away from the main table. 

 Every evening, you bring your finished tower piece to the main table and try to attach it to the rest of the castle. Sometimes your tower fits perfectly. Other times it bumps into something your friend built, and you have to adjust. If you make a terrible mistake, you can go back to a photo you took the night before and rebuild exactly the way it was. 

 In this analogy, the main table is the main branch on GitHub, and your personal tray is your own branch. The photos you took every night are the commit history. When you attach your tower to the main castle, that is a pull request. Your friends can look at your tower before it goes on the main table and suggest changes, like moving a window or using a different color brick. That is code review. 

 If two of you try to attach towers to the same spot at the same time, you get a merge conflict, and you have to sit down together to decide which brick stays. GitHub records every single change made to the castle, so if someone accidentally knocks over a turret, you can go back to the last good version in seconds. This is exactly how teams of developers use GitHub to build software without stepping on each other’s toes.

## Why it matters

In the world of IT, code is the foundation of almost everything, from websites to operating systems to internal business tools. GitHub is the most widely used platform for managing that code, and understanding it is essential for anyone working in technology. 

 For system administrators and IT support professionals, GitHub is often where they find configuration scripts, automation tools, and documentation. Knowing how to clone a repository, read a README file, and submit an issue means you can quickly adopt tools from the community without reinventing the wheel. Many enterprise IT teams also use GitHub to manage infrastructure-as-code files like Terraform configurations or Ansible playbooks. 

 For developers, GitHub is non-negotiable. Job interviews frequently include questions about branching strategies, pull requests, and resolving merge conflicts. A candidate who has a portfolio of projects on GitHub demonstrates real-world coding experience that a resume alone cannot convey. Companies like Microsoft, Google, and Netflix rely on GitHub internally, and many open-source projects you might use daily, like Kubernetes, React, and Linux, are hosted there. 

 From a security perspective, GitHub plays a critical role. Dependabot automatically scans for vulnerable dependencies and creates pull requests to update them. Secret scanning alerts you if you accidentally commit a password or API key. Audit logs let organizations track who accessed what and when. For IT compliance, GitHub can enforce signed commits and branch protection rules that help meet regulatory requirements like SOC 2 or PCI DSS. 

 Finally, GitHub is a career accelerator. Contributing to open-source projects, even fixing a typo in documentation, builds your professional network and shows future employers that you can collaborate effectively. In short, GitHub matters because it is the modern center of gravity for software development and IT operations.

## Why it matters in exams

GitHub appears in several general IT certification exams, though the depth of coverage varies. The CompTIA A+ exam (220-1102) includes basic cloud concepts and collaboration tools, and GitHub is sometimes listed as an example of a cloud-based code repository. Questions may ask you to identify the purpose of version control or name a popular Git hosting service. 

 The CompTIA Network+ exam (N10-008) does not directly test GitHub, but knowing how GitHub uses HTTP, HTTPS, and SSH protocols can help with questions about secure data transfer and port numbers. For example, you might need to know that SSH typically uses port 22, and that GitHub recommends HTTPS for simplicity or SSH for automation. 

 The CompTIA Security+ exam (SY0-601) often includes scenario-based questions about secure development practices. You may be asked how to protect source code in a shared repository. Topics like branch protection, signed commits, and secret scanning are relevant to exam objectives about application security and secure coding. 

 The AWS Certified Cloud Practitioner exam occasionally mentions GitHub as a code repository that integrates with AWS CodePipeline or AWS CodeBuild for CI/CD. Understanding that GitHub can trigger automated actions when code is pushed is helpful for DevOps-style questions. 

 The ITIL Foundation exam does not directly cover GitHub, but the concept of version control aligns with service transition and change management. Questions may ask about tools that support configuration management or release management, and GitHub can be cited as an example. 

 In all exams, the most common question pattern is multiple-choice that asks for the best tool to use in a given scenario. For example, a question might describe a team that needs to collaborate on code and track changes, and the correct answer would be GitHub or a similar version control platform. The traps usually involve confusing GitHub with a CI/CD tool like Jenkins or a project management tool like Jira. Knowing the core purpose of GitHub as a version control and collaboration platform is enough to get these questions right.

## How it appears in exam questions

Multiple-choice questions about GitHub in IT certification exams typically fall into three categories: definition, scenario, and troubleshooting. 

 Definition questions are straightforward. They might ask What is the primary purpose of GitHub? with options like code collaboration, web hosting, email management, or database storage. The correct answer is code collaboration. Another variation asks Which of the following tools is used for version control and collaboration on software projects? The answer will be GitHub. 

 Scenario questions are more common. You might read a description like A development team needs to review each other’s code changes before they are added to the main project. Which GitHub feature should they use? The answer is pull requests. Another scenario: A team wants to automatically run tests every time new code is pushed to the repository. Which GitHub feature supports this? The answer is GitHub Actions. 

 Troubleshooting questions are rarer but appear in more advanced exams. For example, A developer pushes code to the main branch accidentally and wants to undo the last commit without losing the changes. What is the correct Git command to use? The answer is git revert, and the question might be placed in a GitHub context because the commit is on the remote repository. 

 Some questions ask about best practices. Which of the following is a recommended security practice for GitHub repositories? Options may include allowing anyone to push to the main branch, using two-factor authentication, disabling commit history, or storing passwords in the code. The correct answer is using two-factor authentication. 

 Another common pattern involves integration. A company uses GitHub and wants to automatically deploy code to a cloud server after a pull request is merged. Which tool can be used with GitHub to achieve this? Options might include GitHub Actions, AWS CodeDeploy, Jenkins, or all of the above. The correct answer depends on the exam content, but GitHub Actions is the native CI/CD tool for GitHub. 

 Exam tips: Always read the scenario carefully. If the question mentions code review, think pull request. If it mentions automation, think GitHub Actions. If it mentions collaboration and version history, think GitHub. If the question involves a team working on the same files at the same time, version control is the key concept.

## Example scenario

Your team is building a company website. You are responsible for the contact form, and your colleague Maria is working on the homepage. You both start from the same codebase stored on GitHub. 

 You create a new branch called contact-form-update. Maria creates a branch called homepage-redesign. You each make changes on your own branches, committing your work as you go. At the end of the week, you both open pull requests to merge your changes into the main branch. 

 Your pull request has three commits: one that adds a new form field, one that fixes a validation bug, and one that updates the CSS. Maria’s pull request has two commits: one that rewrites the hero section and one that adds a new image. 

 The team lead reviews both pull requests. They comment on your CSS change, suggesting a better way to handle mobile responsiveness. You update the code, push a new commit, and the team lead approves. Maria’s pull request is approved with no changes. Both pull requests are merged into main. 

 If this were done without GitHub, you and Maria might accidentally overwrite each other’s files. With GitHub, all changes are tracked, reviewed, and merged systematically. The main branch always contains the latest stable version, and the entire history of every change is preserved. 

 This scenario is exactly the type of collaborative workflow that exam questions describe. You might be asked what tool the team is using, what the branches are called, or what happens if both developers edit the same file. Understanding the flow from branch creation to pull request to merge is the foundation of GitHub knowledge for certification exams.

## Common mistakes

- **Mistake:** Thinking GitHub and Git are the same thing
  - Why it is wrong: Git is a command-line version control system. GitHub is a website that hosts Git repositories. You can use Git without GitHub, and you can use GitHub alternatives like GitLab or Bitbucket.
  - Fix: Remember: Git is the engine, GitHub is the garage where you park your code. You can use the engine without the garage.
- **Mistake:** Assuming all repositories on GitHub are public
  - Why it is wrong: GitHub offers both public and private repositories. Free accounts can have unlimited private repositories with limited collaborators. Enterprise accounts allow private repositories with full access control.
  - Fix: Check the repository settings. If you see a green Public badge, anyone can see it. If you see a red Private badge, only invited collaborators can access it.
- **Mistake:** Believing you need to be a developer to use GitHub
  - Why it is wrong: IT support, system administrators, and even project managers use GitHub for documentation, configuration files, and issue tracking. Many non-technical roles contribute to repositories by writing guides or reporting bugs.
  - Fix: Create a free GitHub account and try editing a README file directly in the web interface. No coding required.
- **Mistake:** Confusing GitHub with a continuous integration tool like Jenkins
  - Why it is wrong: GitHub is primarily a code repository. CI/CD tools like Jenkins, Travis CI, or GitHub Actions automate testing and deployment. GitHub Actions is built into GitHub, but GitHub itself is not a CI/CD tool.
  - Fix: If the question is about where code is stored and reviewed, the answer is GitHub. If it is about automated testing pipelines, the answer is a CI/CD tool.
- **Mistake:** Thinking you cannot undo changes once they are pushed to GitHub
  - Why it is wrong: Git is designed to undo changes. You can use git revert to create a new commit that undoes a previous commit, or git reset to move the branch pointer backward. Both preserve history in different ways.
  - Fix: Practice with git revert in a test repository. It does not delete history, so it is safe for shared branches.

## Exam trap

{"trap":"In a scenario question, the exam describes a team that needs to share code and track changes, but the correct answer is not GitHub. It might be a file server, email, or USB drive. Learners see 'track changes' and immediately pick GitHub without reading the full scenario.","why_learners_choose_it":"Because 'code sharing' and 'track changes' are strongly associated with GitHub in learners' minds. They rush to the answer they recognize.","how_to_avoid_it":"Read the answer choices carefully. If the scenario describes a small team in a local network without internet, a shared folder might be the correct answer. Always consider the context before jumping to GitHub."}

## Commonly confused with

- **GitHub vs GitLab:** GitLab is very similar to GitHub but offers built-in CI/CD features and self-hosting options out of the box. GitHub started as a pure hosting service and added CI/CD later with GitHub Actions. GitLab has a stronger focus on the entire DevOps lifecycle from planning to monitoring. (Example: If a company wants to host its own Git server on-premises, GitLab is a common choice. If they want a hosted solution with a large open-source community, GitHub is more popular.)
- **GitHub vs Bitbucket:** Bitbucket is a Git repository hosting service owned by Atlassian, the company behind Jira and Confluence. It integrates tightly with Atlassian tools. GitHub has a broader ecosystem and larger community, while Bitbucket is often preferred by teams already using Jira for project management. (Example: A team that uses Jira for issue tracking might choose Bitbucket for seamless integration. A team that wants a public portfolio or access to millions of open-source projects would choose GitHub.)
- **GitHub vs Git:** Git is the command-line version control system that runs on your local computer. GitHub is a web platform that hosts Git repositories in the cloud. You can use Git without ever touching GitHub, but GitHub cannot exist without Git. Git handles the version history; GitHub adds collaboration features. (Example: When you run git commit on your computer, you are using Git. When you run git push, you are sending those commits to a remote server, which could be GitHub, GitLab, or your own server.)
- **GitHub vs Mercurial:** Mercurial is another distributed version control system like Git, but it uses different commands and concepts. GitHub only supports Git repositories. Some older projects use Mercurial, but Git and GitHub are far more common in modern development. (Example: If you see a question about a .hg folder or hg clone command, that is Mercurial, not Git or GitHub.)

## Step-by-step breakdown

1. **Create a GitHub account** — Go to github.com and sign up for a free account. You choose a username, provide an email, and set a password. Free accounts include unlimited public and private repositories, though private repositories have some limits on collaborators and features in the free tier.
2. **Create a new repository** — Click the green 'New' button on your dashboard. Give your repository a name, a description, and choose whether it is public or private. You can optionally initialize it with a README file, a .gitignore template, or a license. The repository is the container for all your project files.
3. **Clone the repository to your local machine** — Using the command line, type git clone followed by the repository URL. This downloads a copy of the entire repository, including all branches and commit history, to your computer. You now have a complete local copy where you can work offline.
4. **Make changes and commit them locally** — Edit files in your project using any text editor or IDE. Use git add to stage the changes, then git commit -m 'your message' to save a snapshot locally. Each commit has a unique ID and a message describing what changed. Commits are stored only on your machine until you push them.
5. **Push changes to GitHub** — Run git push origin main (or git push origin your-branch-name). This sends your local commits to the remote repository on GitHub. Now your teammates can see your changes. If someone else pushed changes before you, Git may ask you to pull their changes first to avoid conflicts.
6. **Create a pull request** — On GitHub, navigate to your repository and click 'Pull Requests' then 'New Pull Request'. Select your branch as the source and main as the target. Add a title and description, then assign reviewers. The pull request is a formal request to merge your changes into the main codebase.
7. **Review and merge the pull request** — Reviewers look at your code, leave comments, and may request changes. You can respond by making new commits on your branch. Once approved, click 'Merge Pull Request'. The changes are now part of the main branch. The pull request is closed and the branch can be deleted safely.

## Practical mini-lesson

GitHub is more than just a place to store code. For IT professionals, it is a platform for collaboration, automation, and security. Understanding how to use it effectively means knowing a few core workflows that go beyond basic push and pull. 

 First is the contribution workflow. In a typical team, no one pushes directly to the main branch. Instead, every developer works on a feature branch. The name of the branch often describes the work, like fix-logout-bug or add-payment-module. When the work is done, the developer opens a pull request. The pull request triggers a review process where other team members can comment on specific lines of code. This is not just about catching bugs. It is also a way to spread knowledge across the team. A junior developer might learn better coding patterns from a senior’s comments. 

 Second is automation with GitHub Actions. You can create workflow files in the .github/workflows directory that define what happens on certain events. For example, when someone pushes to main, a workflow can run all unit tests, build the application, and deploy it to a staging server. This is continuous integration and continuous deployment, or CI/CD. The workflow file is written in YAML and can call actions from the GitHub Marketplace, such as actions/setup-node to install Node.js or docker/login-action to authenticate with Docker Hub. 

 Third is security. GitHub can scan your code for secrets like passwords or API keys before they are committed. If a secret is found, GitHub alerts you and can revoke the token automatically. Branch protection rules prevent a pull request from being merged unless tests pass, reviews are complete, or the branch is up to date. For compliance, you can enforce that every commit is signed with a GPG key, proving that the author is who they claim to be. 

 What can go wrong? Merge conflicts happen when two branches change the same part of a file. Resolving them requires manual editing to choose which changes to keep. Another common mistake is committing large files, which can bloat the repository. Use .gitignore to exclude build artifacts, dependencies, and operating system files. Also, avoid committing sensitive data. Once a secret is pushed to a public repository, even if you delete it, it is still in the history. Always use environment variables or secret management services instead. 

 Professionals also use GitHub for project management. The Issues tab tracks bugs and feature requests. Labels and milestones help organize work. Projects can be managed with Kanban boards. Wikis provide documentation. For IT support teams, having a repository with known issues and fixes can save hours of troubleshooting.

## Memory tip

Think 'GitHub is the Google Drive for code, with reviews and automation built in.'

## FAQ

**Do I need to know how to code to use GitHub?**

No. You can use GitHub to store configuration files, documentation, or any text-based project. Many IT professionals use it for Bash scripts, YAML configurations, and markdown guides.

**Is GitHub free?**

Yes, GitHub offers free accounts with unlimited public and private repositories. Some advanced features like required reviewers or GitHub Actions minutes have limits on free accounts.

**What is the difference between a public and private repository?**

A public repository is visible to anyone on the internet. A private repository is only visible to you and people you explicitly invite as collaborators.

**Can I use GitHub without using Git commands?**

Yes. You can create, edit, and delete files directly in the GitHub web interface. You can also use GitHub Desktop, a graphical application that simplifies Git operations.

**What is a commit?**

A commit is a snapshot of your files at a specific point in time. Each commit has a unique ID and a message describing what changed. You can view the entire commit history of any repository.

**What happens if two people try to edit the same file at the same time?**

GitHub does not lock files. Both people can make changes, but when the second person tries to push, Git will detect a conflict. You must merge the changes manually before pushing.

## Summary

GitHub is the dominant platform for storing, managing, and collaborating on code using Git version control. It is not a programming language or a tool you need to install on a server. It is a cloud service that provides a central location where teams can work on code together safely. 

 In IT certification exams, GitHub appears in questions about collaboration tools, version control, and secure development practices. The most common question patterns ask you to identify the purpose of GitHub, distinguish it from Git and CI/CD tools, and apply it to scenarios involving code review and automated testing. 

 For your career, knowing GitHub is extremely practical. It is used by millions of developers and IT professionals worldwide. Even if you are not a programmer, you will likely encounter GitHub when working with infrastructure-as-code, open-source tools, or team documentation. Creating a free account and practicing the basic workflow of cloning, committing, pushing, and opening a pull request will give you a solid foundation. 

 The key exam takeaway is this: GitHub is about version control and collaboration. If a question involves sharing code, tracking changes, or reviewing code before merging, GitHub is almost always the right answer. Remember that GitHub is not Git, not Jenkins, not Jira, and not a file server. Keep that distinction clear, and you will handle GitHub questions with confidence.

---

Practice questions and the full interactive page: https://courseiva.com/glossary/github
