GitHub
- Pronunciation
- GIT-hub
In short
GitHub is a platform for hosting Git repositories and working on code together, with pull requests, code review, issues and the largest open-source community.
What is GitHub?
GitHub was founded in 2008 and bought by Microsoft in 2018. Git, the version control system, runs on your own computer and keeps the history of a project; GitHub gives that repository a home on the internet, where a team can share it, browse the code and history in a browser, and control who may read or change it.
Its central workflow is the pull request. A developer pushes a branch, opens a pull request to propose merging it, and teammates review the changes line by line, comment and approve. Automated checks, often GitHub Actions workflows, run the tests on the pull request before it can be merged. Issues track bugs and ideas, and projects arrange them on boards.
GitHub is also the center of open source. Anyone can fork a public repository, make a change and send it back as a pull request, which is how most open-source projects accept contributions. On top of code hosting, it offers package hosting, security alerts for vulnerable dependencies, static websites through GitHub Pages and AI coding assistance through Copilot.
A common misconception is that Git and GitHub are the same thing. Git is free, open-source software that works entirely without GitHub; GitHub is one service that hosts Git repositories, alongside alternatives such as GitLab, Bitbucket and self-hosted options like Gitea.
Key takeaways
- GitHub hosts Git repositories online and is owned by Microsoft.
- Pull requests let teams review and discuss changes before merging.
- Issues, projects and GitHub Actions cover planning and automation.
- Forks and pull requests are how most open-source contributions arrive.
- Git is the tool; GitHub is one of several services that host it.
Example
# Inside an existing Git repository on your computer
git remote add origin https://github.com/ada/notes.git
git push -u origin main
# Later: share a change for review
git switch -c fix-typo
git commit -am "Fix typo in README"
git push -u origin fix-typo # then open a pull request on GitHubReaders ask
What is the difference between Git and GitHub?
Git is the version control system that tracks changes in your project, and it runs on your own machine. GitHub is an online service that hosts Git repositories and adds collaboration tools such as pull requests and issues.
Is GitHub free?
Yes for most individual and open-source use: free accounts get unlimited public and private repositories. Paid plans add features and limits for teams and companies.
What is the difference between GitHub and GitLab?
Both host Git repositories with code review, issues and CI/CD. GitLab bundles more DevOps features into one product and is often self-hosted; GitHub has the largest open-source community and the Actions marketplace.
Often compared
See also
- GitVersion Control, p. 10Git is a free, open-source distributed version control system that tracks changes to files over time, so developers can collaborate and undo mistakes.
- RepositoryVersion Control, p. 34A repository is the storage location for a project, holding all of its files plus the complete history of every change recorded by a version control system.
- Pull RequestVersion Control, p. 32A pull request is a proposal to merge changes from one branch into another, giving teammates a place to review, discuss, and test the code before it is merged.
- ForkVersion Control, p. 9A fork is a personal copy of someone else's repository on a hosting platform, letting you experiment freely and propose changes back to the original project.
- Code ReviewVersion Control, p. 4A code review is the practice of having other developers check code changes before they are merged, to catch bugs, improve quality, and share knowledge.
- GitHub ActionsDevOps & Cloud, p. 22GitHub Actions is GitHub's built-in automation platform: YAML workflows in a repo run tests, builds and deployments on events like a push or pull request.
- GitLabVersion Control, p. 26GitLab is a Git hosting platform combining code review, issue tracking, CI/CD pipelines and security scanning in one application, in the cloud or self-hosted.
- Open SourceTeams & Process, p. 14Open source software is software whose source code is published under a license that lets anyone use, study, modify and share it.
Spotted a mistake or something missing on this page?Suggest an edit