All tags
history
Narrow down
Git27
- Tip
git show-branch main featuregit show-branch shows which commits sit on which branchShows in one table which commits are on which branch since they split.3 Dec 2026 - Tip
git log --stat -5git log --stat shows which files each commit touchedList commits together with a per-file summary of what changed3 Dec 2026 - Tip
git log --oneline main..featuregit log main..feature lists the commits that are not on main yetShows exactly which commits a merge would bring in from your branch.30 Nov 2026 - Tip
git log --format='%h %an %ar %s' -10git log with your own format string shows exactly the fields you wantBuilds your own log line with placeholders for hash, author, date and subject.30 Nov 2026 - Tip
git rev-list --count HEADgit rev-list with count gives you a commit count for scriptsPrints a single number of commits, useful for build numbers and quick checks.30 Nov 2026 - Tip
git switch --detach v1.4.0git switch with detach lets you look at an old version without a branchChecks out any tag or commit to test it, without creating or moving a branch.30 Nov 2026 - Tip
git tag --contains a1b2c3dgit tag with contains tells you which releases have a fixLists every tag and branch that includes a given commit.30 Nov 2026 - Tip
git diff main -- . ':(exclude)vendor'git log and diff can leave a folder out with an exclude pathspecHides vendored or generated folders from log and diff with a pathspec.30 Nov 2026 - Tip
git rev-list --max-parents=0 HEADgit rev-list with max-parents=0 finds the very first commitPrints the root commit of a repository, without scrolling to the end of the log.30 Nov 2026 - Tip
git log --since="1 week ago" --author="$(git config user.email)" --onelinegit log with a date range and an author is my standup listLists only your own commits from a chosen period, ready to read out in a standup.30 Nov 2026 - Tip
git diff main@{yesterday} maingit diff main@{yesterday} compares a branch with how it was earlierUses the reflog to compare a branch with its state at an earlier time on your machine.30 Nov 2026 - Tip
git cherry -v maingit cherry -v shows which of your commits are not upstream yetCompares commits by their patch, so cherry-picked copies count as already merged.30 Nov 2026 - Tip
git log --graph --oneline --allgit log with graph, oneline and all draws your branches in the terminalDraws every branch and merge as a small text graph so you see how they relate.30 Nov 2026 - Tip
git bisect new HEADgit bisect with old and new finds when something changed, not just when it brokeUses bisect to find the commit that introduced any change, even a good one.30 Nov 2026 - Tip
Alice <[email protected]> <[email protected]>a .mailmap file merges your old git names into oneMaps old names and email addresses to one identity in shortlog and log output.30 Nov 2026 - Tip
git log --grep="login" -i --onelinegit log with grep searches your commit messages, add -i to ignore caseFinds commits by words in their message instead of by the code they changed.30 Nov 2026 - Tip
git log --oneline --ancestry-path --merges abc1234..maingit log with ancestry-path shows how a commit reached mainFinds the merge that brought a specific commit into a branch.30 Nov 2026 - Tip
git merge-base main featuregit merge-base finds the commit where two branches splitPrints the common ancestor of two branches, handy for diffs, rebases and scripts.30 Nov 2026 - Tip
git show v1.0:config/app.phpgit show commit:path prints an old version of a file without a checkoutPrints a file as it was at any commit or tag, without touching your working tree.30 Nov 2026 - Tip
git show ':/fix login'git show :/text picks the newest commit whose message matchesRefers to a commit by words from its message instead of by its hash.30 Nov 2026 - Tip
git log --first-parent --oneline maingit log --first-parent shows the main line of historyShows one entry per merge by following only the first parent through the history.28 Nov 2026 - Tip
git log --diff-filter=D --summary -- path/to/old-file.phpgit log --diff-filter=D finds when a file was deletedLists only the commits that deleted files, so you can find when a file disappeared.28 Nov 2026 - Tip
git log -G'timeout\s*=' --oneline -p -- config/git log -G finds commits whose changes match a regular expressionFinds commits whose added or removed lines match a regular expression.28 Nov 2026 - Tip
git rebase --update-refs maingit rebase --update-refs moves your stacked branches alongRebases a branch and also moves the branches stacked underneath it.28 Nov 2026 - Tip
git blame -w -C -C -L 40,60 src/config.pygit blame -w -C -C to skip whitespace and find moved codeAttributes lines to the commit that wrote them, ignoring whitespace changes and code moved between files.28 Nov 2026 - Tip
git notes add -m 'Tested on Debian 13' 72a144e2git notes adds a remark to a commit without changing the commitAttaches extra text to an existing commit, shown in git log, without rewriting history.26 Nov 2026 - Tip
git log -L :parseConfig:src/config.jsFollow one function through history with git log -LShows only the commits that changed one function or line range in a file.25 Oct 2026
Shell6
- Tip
export HISTIGNORE='ls*:pwd:cd*'HISTIGNORE keeps boring commands out of your bash historyLists command patterns that bash never saves in the history, like ls, pwd and exit.3 Dec 2026 - Tip
history -d 1042history -d removes a password you typed from bash historyDelete one line, or a range, from your history after typing something secret.30 Nov 2026 - Tip
"\e[A": history-search-backwardThe Up arrow can search bash history for what you already typedType the start of a command, press Up, and get only matching history lines.30 Nov 2026 - Tip
shopt -s histappendshopt -s histappend with history -a keeps bash history from every terminalSaves every command from every open terminal to your bash history instead of only the last one.27 Nov 2026 - Tip
shopt -s histverifyshopt -s histverify shows what !! or !$ expands to before bash runs itPuts the result of !! or !$ on your command line first, so you check it before it runs.27 Nov 2026 - Tip
export HISTTIMEFORMAT='%F %T 'HISTTIMEFORMAT adds a date and time to your bash historyShows the date and time next to every command in your bash history.27 Nov 2026
Storage1
Nothing matches.