linuxlab.io
Tutorials▾
  • Linux & networking
    File system, processes, TCP/IP, BGP and OSPF
    →
  • Terraform & IaC
    HCL, state, plan/apply on a LocalStack sandbox
    →
  • Git & GitHub
    Object model, plumbing, branching, GitHub Actions
    →
All tutorials →
PricingAboutSign inCreate account
/
Intro
Lessons
Footer
linuxlab-TutorialsPricingAboutPrivacy & cookies
Copyright © 2026 LinuxLab. All rights reserved.
linuxlab.io
Tutorials▾
  • Linux & networking
    File system, processes, TCP/IP, BGP and OSPF
    →
  • Terraform & IaC
    HCL, state, plan/apply on a LocalStack sandbox
    →
  • Git & GitHub
    Object model, plumbing, branching, GitHub Actions
    →
All tutorials →
PricingAboutSign inCreate account
/
  • Introduction
  • Chapters
  • How it works
  • Lessons
  • Knowledge base
  • Interview prep
home/git/kb/Everyday workflow

kb/workflow

Everyday Git: status, add, commit, log

The everyday Git cycle with status, add, commit, and log: you edit files, run `git add` to stage a commit, `git commit` to record it, `git status` to see where things stand, and `git log` to read the history. These are the commands you reach for every single day.

  • atomic-commitAtomic Commit

    A commit that makes one logically complete change. Every atomic commit can be safely reverted, and the build and tests pass on every one. This is the foundation of a healthy Git history.

  • conventional-commitsConventional Commits

    A commit message format: `<type>(<scope>): <subject>`. Enables automatic changelog generation and semver bump selection at release time. The standard dates from 2018 and is supported by most release tooling.

  • addgit add

    Moves file changes from the working tree into the index (staging area). Does not commit anything. It only controls what goes into the next commit.

  • commit-cmdgit commit

    Captures what is in the index as a new commit object and moves the current branch to that commit. Without arguments it opens an editor for the message; the most common form uses `-m`.

  • amendgit commit --amend

    Rewrites the last commit: changes the message, folds in forgotten edits, or updates the content. Creates a new object with a new SHA. Safe before push; dangerous after.

  • diffgit diff

    Shows differences between two versions. Four main modes: no flags (working tree vs index), `--staged` (index vs HEAD), `HEAD` (working tree vs HEAD), `<A> <B>` (commit vs commit). Plus options for filtering, output formats, and branch comparison.

  • loggit log

    Traverses the commit graph and prints each commit. By default it starts at HEAD and follows parents. A dozen flags cover 95% of history-browsing scenarios.

  • stashgit stash

    Saves uncommitted changes to a special stack and cleans the working tree back to HEAD. Useful when you need to switch branches urgently but are not ready to commit.

  • statusgit status

    Shows the difference between three Git zones: what is modified in the working tree, what is staged in the index, and which branch is active. The safest command in Git: it changes nothing and you can run it as often as you like.

  • semverSemantic Versioning (SemVer)

    A versioning convention: `MAJOR.MINOR.PATCH`. PATCH is for backward-compatible bug fixes, MINOR for new backward-compatible functionality, MAJOR for breaking changes. Adopted by most libraries.

Footer
linuxlab-
Copyright © 2026 LinuxLab. All rights reserved.
Tutorials
Pricing
About
Privacy & cookies