Interesting, the problem does not appear when cloning the public git repo hello_world.
Here is my .gitattributes:
JJMURO>cat .gitattributes
# These files are text and should be normalized (convert crlf => lf)
*.c text
*.h text
# encode all files as EBCDIC unless mentioned elsewhere
* git-encoding=iso8859-1 zos-working-tree-encoding=ibm-1047
# encode selected files as ascii
.gitattributes git-encoding=ISO8859-1 zos-working-tree-encoding=iso8859-1
.gitignore git-encoding=iso8859-1 zos-working-tree-encoding=iso8859-1
Here is output of commands:
JJMURO>type git
git is hashed (/u/mvsbuild/nirvana-git/git/bin/git)
JJMURO>git --version
git version 2.14.4_zos_b06
JJMURO>git clone git@github.ibm.com:joemuro/hello-world.git
Cloning into 'hello-world'...
remote: Counting objects: 13, done.
remote: Total 13 (delta 0), reused 0 (delta 0), pack-reused 13
Receiving objects: 100% (13/13), done.
Resolving deltas: 100% (1/1), done.
JJMURO>cd hello-world/
JJMURO>lt
total 48
drwx------ 3 JJMURO DEPTABC 8192 Nov 16 11:32 .
drwx------ 4 JJMURO DEPTABC 8192 Nov 16 11:32 ..
drwx------ 8 JJMURO DEPTABC 8192 Nov 16 11:32 .git
t ISO8859-1 T=on -rw------- 1 JJMURO DEPTABC 391 Nov 16 11:32 .gitattributes
t IBM-1047 T=on -rw------- 1 JJMURO DEPTABC 176 Nov 16 11:32 README.md
t IBM-1047 T=on -rw------- 1 JJMURO DEPTABC 79 Nov 16 11:32 hello.c
JJMURO>git st
On branch master
Your branch is up-to-date with 'origin/master'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: README.md
modified: hello.c
no changes added to commit (use "git add" and/or "git commit -a")
JJMURO>lt
total 48
drwx------ 3 JJMURO DEPTABC 8192 Nov 16 11:32 .
drwx------ 4 JJMURO DEPTABC 8192 Nov 16 11:32 ..
drwx------ 8 JJMURO DEPTABC 8192 Nov 16 11:32 .git
t ISO8859-1 T=on -rw------- 1 JJMURO DEPTABC 391 Nov 16 11:32 .gitattributes
t IBM-1047 T=on -rw------- 1 JJMURO DEPTABC 176 Nov 16 11:32 README.md
t IBM-1047 T=on -rw------- 1 JJMURO DEPTABC 79 Nov 16 11:32 hello.c
JJMURO>git diff
JJMURO>lt
total 48
drwx------ 3 JJMURO DEPTABC 8192 Nov 16 11:32 .
drwx------ 4 JJMURO DEPTABC 8192 Nov 16 11:32 ..
drwx------ 8 JJMURO DEPTABC 8192 Nov 16 11:32 .git
t ISO8859-1 T=on -rw------- 1 JJMURO DEPTABC 391 Nov 16 11:32 .gitattributes
t IBM-1047 T=on -rw------- 1 JJMURO DEPTABC 176 Nov 16 11:32 README.md
t IBM-1047 T=on -rw------- 1 JJMURO DEPTABC 79 Nov 16 11:32 hello.c
JJMURO>git st
On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working directory clean
JJMURO>
(I have lt aliased to ls -lTa)