Skip to content

Instantly share code, notes, and snippets.

@jhumigas
Last active February 2, 2026 21:28
Show Gist options
  • Select an option

  • Save jhumigas/7da7b4e9b05b06a4bb9f9b8dee83c657 to your computer and use it in GitHub Desktop.

Select an option

Save jhumigas/7da7b4e9b05b06a4bb9f9b8dee83c657 to your computer and use it in GitHub Desktop.
List of common alias I use
[user]
email = me@me.com
name = David M.
[alias]
# one-line log
# Source: https://gist.github.com/mwhite/6887990
l = log --pretty=format:"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=short
a = add
ap = add -p
c = commit --verbose
ca = commit -a --verbose
cm = commit -m
cam = commit -a -m
m = commit --amend --verbose
cano = commit --amend --no-edit
pf = push --force-with-lease
# clean branches that are merged
gone = "!f() { git fetch --all --prune; git branch -vv | awk '/: gone]/{print $1}' | xargs git branch -D; }; f"
d = diff
ds = diff --stat
dc = diff --cached
s = status -s
co = checkout
cob = checkout -b
# list branches sorted by last modified
b = "!git for-each-ref --sort='-authordate' --format='%(authordate)%09%(objectname:short)%09%(refname)' refs/heads | sed -e 's-refs/heads/--'"
# list aliases
la = "!git config -l | grep alias | cut -c 7-"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment