Git
Git is a distributed version control system created in 2005 by Linus Torvalds to support development of the Linux kernel. It tracks every change to a project's files and lets many developers work on the same codebase in parallel, then merge their changes without overwriting one another.
How Git works
At the core of Git is a local repository that stores the project's entire history. Work revolves around a few key concepts:
- Commit — a saved snapshot of changes with a message, author and unique identifier;
- Branch — an independent line of development where you can experiment without affecting the main code;
- Merge — combining changes from different branches into one coherent version;
- Remote — a hosted repository (for example on GitHub or GitLab) that you send changes to and pull changes from using push and pull.
"Distributed" means every developer keeps a full copy of the project's history on disk. This lets you work offline, and no central repository becomes a single point of failure.
Practical application
Git is today's industry standard for software development. Teams use it to develop features on separate branches, review code through pull requests, and maintain a clean change history that makes debugging and reverting mistakes far easier.
Beyond the code itself, Git ties into automation: pushing changes to a repository triggers CI/CD pipelines that build, test and deploy the application. The same idea underpins GitOps, where a Git repository becomes the single source of truth for the desired state of infrastructure. Fluency in Git is now a baseline skill for every developer and DevOps engineer.
Powiązane pojęcia
Najczęstsze pytania
What is the difference between Git and GitHub?
Git is a version control program that runs locally on your machine and tracks code changes. GitHub is an external service that hosts Git repositories in the cloud and adds team collaboration, pull requests and automation. You can use Git without GitHub, but not the other way around.
What is a commit in Git?
A commit is a snapshot of changes saved to history, stamped with an author, date and message. Each commit has a unique identifier (a hash), which lets you restore the project to any earlier state and trace exactly who made a given change and when.
