git add fails with fatal: src/mytest.pax added file untagged, set correct file tag

152 Views Asked by At

When I try to add files to a commit group I get an error.

Command: git add .

Error: fatal: src/python/files/mytest.pax added file untagged, set correct file tag

git —version: git version 2.3.5_os390_b013

Platform: z/OS

The problem here is double:

  1. I can be a tag in the USS in z/OS because when encoding of the files is different that default you can get automatic conversion. This file is binary and it is not tagged:
chtag -p *          
t ISO8859-1   T=on  BUZ0N_DEVOPS_SASPGM01_CURR_IN.txt
t ISO8859-1   T=on  BUZ0N_DEVOPS_SASPGM01_FINAN_IN.txt
t ISO8859-1   T=on  SAS_Sample_pack1.txt
t ISO8859-1   T=on  SampleSASFile.sas7bdat
t ISO8859-1   T=on  airline.sas7bdat
t ISO8859-1   T=on  currency.txt
t ISO8859-1   T=on  currency_orig.txt
t ISO8859-1   T=on  financial.txt
- untagged    T=off mytest.pax
- untagged    T=off test123.sas7bdat
  1. It could be a problem with commit tags.

In any of both cases I don’t have a clue of how to solve it.

Thanks!

I need to add the files and then commit to the repository.

1

There are 1 best solutions below

0
povk On

You have to set up a .gitattributes file, tag it as ISO8859-1 (easiest way is to just copy an existing text file that's tagged correctly - or use chtag) and then add the attributes for *.pax to be recognized as a binary file:

*.pax binary