Because display broken characters when diff the shift_jis encoding file by default.
I configed the .gitattributes for that.
After that It can resovled the diff problem before commit.
But still have some problems
1.display a file before add to index
2.diff in history after commit
Please give me some info to resolve this problem.
Thanks!