Yes, the encoding of checked-out files can be controlled via the git attributes mechanism. The release notes describe how to use this, but briefly, there are two new attributes available on a per-file basis:
- git-encoding sets the encoding used in the repository
- working-tree-encoding sets the encoding to be used in the checked-out working directory
Conversion is done only if both attributes are set for a file. Here is an example that causes all .h and .c files to be checked out as EBCDIC:
*.[hc] git-encoding=iso8859-1 working-tree-encoding=ibm-1047
This allows an open source repo cloned from (say) github to be used bi-directionally.
– Jerry