Skip to main content

A Git developer's daily workflow

Summary: a developer using Git repeats the same four-step cycle every day: edit, stage, commit, push. This lesson describes that cycle precisely, and introduces Git's three "zones" — the notion beginners misunderstand most.


1. A developer's typical day with Git

Here is what a senior developer does, between the morning coffee and leaving in the evening.

This workflow repeats daily in every modern development team. Each step has a precise role. Let us look at them closely.


2. The core: the edit / stage / commit loop

This is the part that comes back several times a day. Three actions repeat in a loop.

A typical commit gathers one coherent intention: "fix email validation", "add the CSV export button", "refactor the payment function". Not ten different things at once — one commit = one idea.

On average, a productive developer makes between 5 and 15 commits per day on their working branch.


3. Git's three zones — the key to understanding everything

This is where 90% of beginners get lost. Git organizes your work into three distinct zones, and each command moves files from one to another.

Each zone has a precise role:

ZoneWhat it is for
Working directoryThis is where you edit. Every change is visible immediately, but not recorded in Git until you decide so.
Index / Staging areaWaiting room. You place there the changes you want to include in the next commit. This zone is what lets you split a work session into several clean commits.
Local repositoryPermanent history. Once a commit is there, it will not disappear (barring explicit action). This is where you can travel back in time.

Analogy: preparing a parcel to send.

  • Working directory = your messy room, with objects everywhere.
  • Index / Staging = the cardboard box in which you put what you want to send.
  • Commit = the moment you seal the box, write the label and note the date.

4. Why a staging area? The real benefit

This is THE feature that distinguishes Git from older systems like SVN. Why not commit the changes directly?

Here is a realistic scenario: you modified 3 files during the morning, but for two completely different reasons.

Thanks to the staging area, you can make two distinct commits instead of one catch-all commit like "morning changes". Six months later, when you hunt for the origin of a bug, a readable history will save you hours.

It is this small detail — the staging area — that makes a well-managed Git project infinitely more searchable than a project where everything is mixed together.


5. Anatomy of a good commit

A commit contains three elements that will appear forever in the project's history:

A good commit message answers the question "why", not "what". Compare:

Bad messageGood message
"changes""Fix email validation to accept addresses with a +"
"update file""Migrate the Redis connection to TLS 1.3 (GDPR, ticket #4823)"
"fix bug""Prevent double-click on the buy button (ticket #892, March 14 P2 incident)"

The what is already in the diff. The message must explain the why — what the diff does not say.

A very popular convention is Conventional Commits, which prefixes the message with a type (fix:, feat:, docs:, refactor:…). It is taught in detail in the Premium Git Course.


6. The push — leaving your local bubble

Until you run git push, nobody but you sees your commits. They live only on your machine, in your local repository.

Two golden rules:

  • Push often (at least once a day). A push is also a backup — if your disk dies, your work is safe on the server.
  • Do not push commits straight to the main branch. Always go through a feature branch + a pull request — that is the subject of lesson 2.

Remember in 30 seconds

  • A Git developer repeats the same cycle every day: fetch → branch → edit/stage/commit in a loop → push → open a PR.
  • Git organizes work into 3 zones: working directory, staging area, local repository.
  • The staging area is what lets you split a work session into clean, readable commits.
  • A good commit message explains why, not what.
  • Until you run git push, your work stays invisible to others.

Next: Working as a team: branches and pull requests →