Git
What it is
Git is a distributed version-control system: it records the history of files in a repository and lets people work on changes in parallel. A normal clone keeps a local repository history, so many everyday actions—creating commits, branches, and merges—can happen before sharing work with a hosted service such as Azure Repos or GitHub.
Why it exists
Teams need a trustworthy answer to “what changed, who changed it, and how do we return to an earlier version?” Git records those changes as commits. Branches give a change its own workspace, and a pull request provides a deliberate way to review it before it reaches shared work.
Key ideas
- Repository (repo) is the project and its recorded history. The hidden
.gitdirectory holds Git’s local data. - Commit is a named record of a coherent change. It has an identifier, parent history, author information, message, and the file state it records.
- Branch is a lightweight named line of development. A feature branch lets someone work without changing
mainimmediately. - Remote is a shared repository location.
fetchbrings remote history into the local repo;pushshares local commits;pullupdates local work using fetched changes. - Working directory, staging area, and commit history are the everyday flow: edit files, use
git addto choose what belongs in the next commit, then usegit committo record it.
Northwind example
Luis changes the delivery-fee calculation on a branch named feature/delivery-fee. He stages the intended files, writes a commit message that explains the reason, and pushes the branch to Northwind’s shared Azure Repos project. The production main branch has not changed yet. Luis opens a pull request so teammates can inspect the exact diff and automated checks can run before the branch is merged.
Common workflow (memorize)
git clone → create a branch → edit → git add → git commit → git push → open a pull-request → merge after the required review and checks.
Exam notes
- Git records a directed history of commits and supports local branches.
- A commit identifier refers to a recorded state and history; do not confuse it with a deployment approval.
- Azure DevOps and GitHub host Git repositories and add collaboration features such as pull requests and permissions.
Related
branching-strategy · pull-request · merge-conflict · git-hooks · azure-repos · github
📘 Source: Microsoft Learn — Git