Skip to content

Instantly share code, notes, and snippets.

@jcelerier
Created April 4, 2015 18:26
Show Gist options
  • Save jcelerier/0f170a9446f3a9419848 to your computer and use it in GitHub Desktop.
Save jcelerier/0f170a9446f3a9419848 to your computer and use it in GitHub Desktop.
Sort TODO's by chronological order in git
git grep -n TODO | while IFS=: read -r file line junk; do git --no-pager blame --line-porcelain -L "$line,$line" -- "$file" | grep -v 'previous' | awk 'NR==4 || NR==12' | sed 'N;s/\n/ /' ; done | sort -k 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment