Handy git commands

By Niraj Zade  |  2023 Sep 17  |  1m read  |  231 words

A collection of handy git commands


All commands aren't mine. These have been collected while lurking in the internet.

Commands to judge new codebases

Sources:

WARNING: It takes some experience to know when to draw conclusions from these numbers, and when not to.

Numbers can and will lie. A lot of times.

Find editing hotspots in the codebase.

Files that are edited A LOT often tend to be hairy messes that are painful to touch and modify.

git log --format=format: --name-only --since="1 year ago" | sort | uniq -c | sort -nr | head -50

Get contributors ranked by commit counts. Then find out if the most prolific contributors are still active, or if they have left the project.

git shortlog -sn --no-merges

Find the files most edited during fixes. To find files that cause the most number of problems.

git log -i -E --grep="fix|bug|broken" --name-only --format='' | sort | uniq -c | sort -nr | head -50

Get commit count by month. To get a feel of the project's development - growing, stabilized, dying. Great for finding where the project is in its maturity cycle.

git log --format='%ad' --date=format:'%Y-%m' | sort | uniq -c

Frequency of reverts and hotfixes.

git log --oneline --since="1 year ago" | grep -iE 'revert|hotfix|emergency|rollback'

Blog posts


Articles

I learn through writing. Most of these are ever evolving pieces.


data engineering

Spark Microbook
2025 Oct 16 | 28m (5199 words)

Spark join strategies
2024 Jan 22 | 13m (2442 words)

Spark performance optimization compendium
2025 Oct 11 | 7m (1359 words)


python

Python gotchas compilation
2023 Sep 17 | 5m (1058 words)

Unicode string normalization schemes in Python
2024 May 06 | 7m (1303 words)


resources

Links collection
2025 Jun 15 | 3m (630 words)

Papers, books, talks etc
2025 Jun 02 | 4m (744 words)


software engineering

Handy git commands
2023 Sep 17 | 1m (231 words)


sqlserver

SqlServer reference - All date & time formatters
2025 Jul 10 | 2m (519 words)


work

Lecture - You and your research by Dr. Richard Hamming
2024 Oct 14 | 1hr18m (14441 words)

Why charge more as an engineer
2025 Oct 13 | 6m (1252 words)


© Niraj Zade 2026 - Website, Linkedin
Website was autogenerated on 08 Apr 2026
Whoever owns storage, owns computing


The font used is Basier Square. Love this font.
This website is auto-generated by a nightly chron job that runs a python script, which checks my obsidian markdown files and re-generates the pages if changes are detected, and commits them to git. The website is then auto-deployed by a brainless CI-CD setup. Currently hosted on cloudflare pages.
I just write my markdown files. The website takes care of itself.