diff --git a/git-find-commit-containing-exact-same-file.sh b/git-find-commit-containing-exact-same-file.sh new file mode 100755 index 0000000..65b6d33 --- /dev/null +++ b/git-find-commit-containing-exact-same-file.sh @@ -0,0 +1,11 @@ +#from: https://www.reddit.com/r/git/comments/ja0ro8/given_a_specific_file_how_can_i_find_on_which/ + +#find_by_hash() { + hash=`git hash-object $1` + git rev-list --all -- $2 | while read rev + do + git ls-tree -r "$rev" | grep $hash >/dev/null && echo "$rev" + done +#} +#find_by_hash() +