What is Git
· Category: Git
Short answer
Git is a free, open-source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.
How it works
Git stores snapshots of your files in a local repository. When you commit, Git records the state of all tracked files at that moment. It uses a directed acyclic graph to track history, allowing branches, merges, and rollbacks.
Example
# Initialize a repo
git init
# Track changes
git add file.txt
git commit -m "Add file"
# View history
git log
Why it matters
Git enables collaboration by allowing multiple developers to work on the same codebase simultaneously. Its branching model supports parallel development, and its distributed nature means every clone is a full backup of the project history.