Skip to content

Instantly share code, notes, and snippets.

@hikarin522
Last active August 9, 2018 01:06
Show Gist options
  • Save hikarin522/ccaa1ac6e3546e7fcb37d5355004b94d to your computer and use it in GitHub Desktop.
Save hikarin522/ccaa1ac6e3546e7fcb37d5355004b94d to your computer and use it in GitHub Desktop.
gitでLFSじゃないバイナリを検索する ref: https://qiita.com/hikarin522/items/b3c884648afbf0674bb3
[alias]
ls-binary = !"func() { git ls-files --eol \"$@\" | grep -v \"attr/-text\" | grep \"[iw]/-text\"; }; func"
$ git ls-files --eol |
%{ Write-Output -NoEnumerate (-split $_) } |
?{ $_[2] -ne 'attr/-text' -and ($_[0] -eq 'i/-text' -or $_[1] -eq 'w/-text') } |
%{ $_ -join ' ' }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment