Git is a version control system that allows developers to manage and keep track of their source code history. It was created by Linus Torvalds in 2005 and is used for tracking code changes, tracking who made changes, and coding collaboration. Git allows developers to manage projects with repositories, clone a project to work on a local copy, control and track changes with staging and committing, branch and merge to allow for work on different parts and versions of a project, pull the latest version of the project to a local copy, and push local updates to the main project.
GitHub, on the other hand, is a cloud-based hosting service that allows developers to store and manage their code using Git. It provides the distributed version control of Git plus access control, bug tracking, software feature requests, task management, continuous integration, and wikis for every project. GitHub is the largest host of source code in the world and has been owned by Microsoft since 2018. Projects on GitHub.com can be accessed and managed using the standard Git command-line interface, and multiple desktop clients and Git plugins are also available. The primary purpose of GitHub is to facilitate the version control and issue tracking aspects of software development.
In summary, Git is a version control system that allows developers to manage and keep track of their source code history, while GitHub is a cloud-based hosting service that allows developers to store and manage their code using Git, as well as providing additional features for software development.