2014年1月15日 星期三

GIT: How to tell a file is binary or text?

How to determine if Git handles a file as binary or as text? - Stack Overflow
http://stackoverflow.com/questions/6119956/how-to-determine-if-git-handles-a-file-as-binary-or-as-text

  1. git diff-tree -p 4b825dc642cb6eb9a060e54bf8d69288fbee4904 HEAD -- XXXX
  2. git diff-tree --numstat 4b825dc642cb6eb9a060e54bf8d69288fbee4904 HEAD -- XXXX
  3. git grep -I --name-only -e "" -- XXXX

4b823d… is a magic SHA which represents the empty tree



沒有留言: