Git is a distributed version control system that records changes to files over time, allowing developers to track the full history of a project, collaborate with others, and revert to any previous state of their code.
Developed by Linus Torvalds in 2005 to manage the development of the Linux kernel, Git was built with speed, data integrity, and support for non-linear workflows in mind. Unlike older version control systems that stored changes on a central server, Git is distributed - meaning every developer working on a project has a complete copy of the entire history on their own machine. This makes most operations fast, and it means work can continue even without an internet connection.
The core concept in Git is the commit. A commit is a snapshot of the project at a specific point in time, accompanied by a message describing what changed and why. These snapshots are chained together into a history, making it possible to see exactly who changed what, when, and for what reason. This audit trail is one of the reasons Git has become standard practice in software development.
Git also supports branches, which are independent lines of development. A developer can create a branch to work on a new feature or fix a bug without affecting the main codebase. Once the work is complete and reviewed, the branch is merged back in. This workflow makes it possible for large teams to work in parallel on the same project without constantly overwriting each other's work.
When things go wrong, and in software development they will, Git makes it straightforward to identify exactly when a problem was introduced and to restore a previous working version of the code. This ability to undo mistakes with confidence is one of the most practically valuable aspects of using version control.
Git itself is the underlying tool, but it is most commonly used in combination with a hosting platform such as GitHub, GitLab, or Bitbucket, which provide a web interface for storing repositories, reviewing code, and managing collaboration. These platforms build on top of Git's capabilities but are separate products - Git can be used entirely without them.
Today, Git is the dominant version control system in the software industry and is used not only for application code but also for infrastructure configuration, documentation, and increasingly for any kind of file that benefits from a tracked change history.