Skip to content

Instantly share code, notes, and snippets.

@tclavier
Created July 24, 2017 07:27
Show Gist options
  • Save tclavier/b2991b7836fffbfdb99aa2946c2c5817 to your computer and use it in GitHub Desktop.
Save tclavier/b2991b7836fffbfdb99aa2946c2c5817 to your computer and use it in GitHub Desktop.
Find oldest line in git repo
#!/bin/bash
for file in $(find . -type f);
do
git blame --date=format:%Y%m%d $file
done | sed -e 's/.*\s\([0-9]\{8\}\)\s.*/\1/' | sort -r | tail
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment