A Git beginner usually meets the vocabulary before the ideas. Someone says "push your branch and raise a pull request", and five unfamiliar terms arrive in one breath. This primer explains the words behind everyday teamwork in the order a change travels: from your machine, to a shared repository, through review and into continuous integration. Each term comes with what it records and what it does not, because that distinction prevents most early confusion.
Why Git vocabulary is worth learning precisely
Git is a distributed version control system. A normal clone carries the project history with it, so you can inspect earlier versions and record new ones without a network connection. Shared hosting platforms add accounts, review screens and automation around that core. Knowing whether a word belongs to Git or to the platform helps you decide which documentation to open when a step fails.
Your own machine: repository, staging area and commit
A repository is the project together with its recorded history. The working tree is the set of files you can see and edit. Between them sits the staging area, also called the index, where you assemble what the next record will contain.
A commit is that record: a snapshot of the tracked content, with an author, a date, a message and a link to its parent commit or commits. Each commit has an identifier calculated from its contents, so altering a commit produces a different one.
A typical sequence is short:
- git status shows what has changed and what is staged;
- git diff shows edits not yet staged;
- git add stages chosen changes;
- git commit records them with a message.
The staging area lets you separate two unrelated edits into two commits. That matters later, when a reviewer wants to understand one idea at a time or someone needs to undo one without the other.
Git also distinguishes tracked files, which it already knows about, from untracked ones, which it has noticed but never recorded. A new file stays untracked until you add it. This is why a colleague can report that something "works on my machine" while the shared copy lacks the file entirely: it was saved to disk and never committed. Reading the status output before each commit catches that mistake early.
Writing a message a colleague can use
The code shows what changed. The message should add why. A first line that states the effect, followed by a short explanation of the reason, is far more useful months later than "fix" or "updates". Teams often agree a format; follow the one in use and ask for it if it is not written down.
Branches and merges
A branch is a movable name pointing to a commit. Creating one is cheap because it does not duplicate your files into a second project. HEAD indicates what you currently have checked out. When you commit on a branch, its name moves forward.
A merge brings one line of work into another. If the target has not moved since you started, Git can simply advance the pointer, known as a fast-forward. Otherwise it usually creates a merge commit with two parents. A rebase takes your commits and replays them on a new base, creating new commits. It can tidy history, but rewriting commits that others already use causes avoidable trouble, so agree a rule before doing it on shared branches.
A conflict occurs when Git cannot combine changes on its own, often because both sides edited the same lines. Git marks the affected places. A person decides the intended result, removes the markers, tests, stages the file and completes the operation. A conflict is a request for judgement, not evidence that someone misbehaved.
Sharing work: remote, fetch, pull and push
A remote is a named reference to another copy of the repository, commonly called origin. Fetch downloads new commits and updates your record of the remote branches without changing your working files. Pull fetches and then integrates, by merge or rebase depending on settings. Push sends your commits to the remote. A rejected push often means the remote has commits you lack; fetch and look before reaching for force.
Review: the pull request
A pull request, called a merge request on some platforms, is a proposal to merge a branch, with discussion and approvals attached. It is a hosting platform feature built around Git. A reviewer can check whether the change matches its stated purpose, whether tests cover it and whether someone else could maintain it.
Small requests are easier to read carefully. As an author, describe the aim, how you checked it and anything you are unsure about. As a reviewer, separate required changes from suggestions and comment on the code, not the person.
The link to continuous integration
Continuous integration is the practice of merging work frequently and verifying it automatically. A push or pull request can trigger a pipeline that builds the project and runs tests against a particular commit. The result is attached to that commit, which is why the identifier matters: it states exactly what was tested.
A passing check says the configured tests passed. It cannot show that the tests are sufficient, which leaves review with a real job. A protected branch setting can require passing checks and approval before merging. Our earlier explainer on DevOps specialisation and pay looks at where such skills can sit in a wider career.
One change from start to finish
Suppose a team needs to correct a date format in a report. A developer fetches the latest history and creates a branch from the updated main line. She edits the code, adds a test, reviews the difference and commits. After pushing the branch, she opens a pull request. The pipeline runs and one test fails because it assumed the old format. She updates that test, commits again and pushes; the request picks up the new commit and the checks run afresh. A colleague asks for a clearer function name, approves the revision and the branch is merged. Finally, the team deletes the finished branch name. The commits remain reachable from the main line, so the history still shows what was done.
Each noun in that account answers a different question: where the work happened, what was recorded, who examined it and which version was tested. Teams that use the words consistently spend less time working out what a colleague meant.
Mini-glossary
| Term | Plain meaning |
|---|---|
| Clone | A local copy of a repository, normally with its history |
| Fork | A separate hosted copy under another account or space |
| Tag | A name for a specific point, often marking a release |
| Revert | A new commit that undoes the changes of an earlier one |
| Reset | Moves the current branch pointer; some forms discard work |
| Stash | A temporary shelf for uncommitted changes |
| .gitignore | A list of untracked file patterns Git should leave alone |
Note that an ignore file does not remove something already committed. If a password enters history, change the password first, then deal with the record.
Practice that proves understanding
Create a throwaway repository. Commit twice, branch, edit the same line on both branches, merge and resolve the conflict. Then run git log --graph --oneline and explain each point aloud. If the picture makes sense, the terms have become tools.
Teams that want structured learning can compare course outlines against this list. For one organisational example, Cotocus lists corporate training on DevOps and CI/CD, offered in classrooms and online. Ask any trainer how much time learners spend resolving conflicts and reading history, since those are skills best judged by watching someone perform them.
Comments
Post a Comment