Skip to content

Instantly share code, notes, and snippets.

@TheCodeArtist
Last active November 2, 2015 06:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TheCodeArtist/bd4e696afd869df7d636 to your computer and use it in GitHub Desktop.
Save TheCodeArtist/bd4e696afd869df7d636 to your computer and use it in GitHub Desktop.
Couple of git and bash commands to generate list of commits (patches) and sort them by size to begin effort estimation.
# Generate alist of patches from a "base" commit-hash in the past to the HEAD.
# Run this on the source repository
git format-patch --root <commit-hash> <optional-sub-dir> -o patches-from-commit-hash-to-HEAD/
# Generate a sorted (by LoC) list of patch files generate above to focus n the largests changes first.
# NOTE: Sometime, several "small" changes may introduce "dependencies" required by a large change down the line.
# Use "git blame -wCCC", "git log -S <string>" and "git gui blame" for code archaeology.
find ./patches-from-commit-hash-to-HEAD/ -type f -exec wc -l {} + | sort -rn | wc -l > 0000-list-of-commits-sorted-by-lines.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment