Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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