Last active
December 27, 2015 03:59
-
-
Save bogdanRada/7263469 to your computer and use it in GitHub Desktop.
Git show deleted files from a directory
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ git log --diff-filter=D --summary | sed -n '/^commit/h;/\/some_dir\//{G;s/\ncommit \(.*\)/ \1/gp}' | |
delete mode 100644 blah/some_dir/file1 d3bfbbeba5b5c1da73c432cb3fb61990bdcf6f64 | |
delete mode 100644 blah/some_dir/file2 d3bfbbeba5b5c1da73c432cb3fb61990bdcf6f64 | |
delete mode 100644 blah/some_dir/file3 9c89b91d8df7c95c6043184154c476623414fcb7 | |
You'll get all files deleted from some_dir (see the sed command) together with the commit number in which it happen. Any sed regex will do (I use this to find deleted file types, etc) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment