Git Aliases for Status and Diff Shortcuts

Create git aliases for compact status display and diff operations. View short status with branch info and diff staged changes quickly.

Workflow Aliases

Detailed Explanation

Status and Diff Shortcuts

These aliases provide faster access to the most frequently checked information:

[alias]
    st = status
    ss = status -sb
    df = diff
    dc = diff --cached
    ds = diff --stat

st and ss — Status Variants

The basic st alias is a simple abbreviation. The ss alias is more interesting:

git ss
# ## main...origin/main
#  M src/app.ts
# ?? new-file.txt
# A  staged-file.ts

The -s flag gives short format output, and -b adds the branch and tracking info. Together they produce a compact, scannable summary.

Status Symbols

Symbol Meaning
M Modified
A Added (staged)
D Deleted
R Renamed
?? Untracked
!! Ignored

The left column shows the staging area status, the right column shows the working tree status.

df, dc, ds — Diff Variants

Alias Shows
df Unstaged changes (working tree vs staging area)
dc Staged changes (staging area vs last commit)
ds Summary of changed files with line counts

The dc alias (diff --cached) is particularly important. It shows exactly what will be included in the next commit, which is essential for reviewing before committing.

Combining Status and Diff

A common workflow:

git ss           # Quick overview of changed files
git dc           # Review what's staged
git commit -m "..."  # Commit with confidence

Use Case

Use these aliases dozens of times per day to check the state of your working tree and staging area. The short status format is especially useful when you have many modified files and want a quick scannable overview rather than git's verbose default output.

Try It — Git Alias Builder

Open full tool