I am required to not to include .gitattribute. but subgit add it to the repository. could I know how can I stop subgit adding .gitattribute file?
How to skip generating .gitattribute file?
912 Views Asked by Gayan Viranka At
2
There are 2 best solutions below
0

As SubGit explains in "Line endings handling in SVN, Git and SubGit", those .gitattributes
files are needed, espacially if you are pushing back to SVN from the Git repo after conversion.
See for instance "SubGit and .gitattributes
".
But for a one-time conversion from SVN to Git, you could simply delete any .gitattributes
files, add, and make a final commit recording those deletions:
find . -name .gitattributes -delete
SubGit adds .gitattributes files in two cases: when translate.eols is set to 'true' and when translate.otherProperties is set to 'true'. The latter is 'false' by default, so I believe the .gitattribiutes file is being created because the 'eols' is 'true'. To prevent creating .gitattribiutes file the settings should be set to 'false' in SubGit configuration file:
The problem here is that the settings can't be changed on the fly, it must be set prior to the initial translation. So if the mirror has already been established, you would need to rebuild it to apply these settings:
After that the files should not appear any more.