I am converting a large SVN-repo (~28k Commits) into Git using git-svn. When the process was through (~ 1 1/2 weeks) I encountered some .ps1-files being treated as binary in the diffs. I have commited a .gitignore file on master (after the conversion of course) that tells git to treat the files as text:
* -text
*.snk binary
*.ico binary
*.chm binary
and so on...
Note: -text just tells it to treat line endings as is (not storing them with Unix line endings in its database)
However I was only able to add the .gitattributes AFTER the conversion of course.
The .gitattributes does not quite work out in Git-extensions for previous commits/diffs but that might be another problem that I don't want to discuss right now. The main problem is the files that are stored binary in git.
I read somewhere that you could store a gitattributes under .git/INFO. I could do this before the conversion process but I haven't given that another try since the conversion takes more than a week and I would like to get it right at the first strike.
So basically my question is now the following: With the converted repository in mind: Can I convert existing binary files in an existing git repository to text files?
If not: How would I tell git-svn which files are to be treated as text/binary using gitattributes for the whole conversion procedure?
EDIT: The problem was not anything in the conversion (git treating files as binary on purpose) but files being treated as binary by 'git diff' or Git-extensions. (see answer) When using a diff tool (for example BeyondCompare) you can still work with those files. It is then only a little annoying in the history. The conversion worked flawless since the files were migratet as is. (UTF-16 that is)