How to completly turn off git line endings auto correction

79 views Asked by At

I'm writing a script that migrates our SVN repos to GIT. I have discovered that one repo contains a .gitattributes file (with content like * type=text). That unfortunately means that all files are modified (line endings are auto corrected).

I don't want that because as a next step we are doing branch filtering (using git filter-branch) and it can't proceed with unstaged changes/uncommitted changes (and I also don't want to commit them).

How can I avoid changing endline characters on migration?

1

There are 1 answers

0
Nick Volynkin On BEST ANSWER

Just delete the .gitattributes file and do migration.

After you do it, set up the .gitattributes and/or git config core.autocrlf on your working machine(s) in the proper way.

I've asked that in comments and still interested: Why could your SVN repo contain a .gitattributes file? For what purpose was it added to an SVN repo?