How do I fix line ending issues after migrating from SVN to git? -


I just cloned a subdivision repository to GIT

  git svn clone - Studied - writer-file = ourcommitters.txt svn: //svn.internalserver.com  

While doing so, I had 'git flag' core.autocrlf set to 'true' - just In the case of the case.

After a long time, the command is over. As a result, I removed the GIT repository a bit (removing unintended branches, preparing tags etc.) and now everything looks great and works well. The repository is hosted on a Linux box, and other Linux Cloning to work on boxes works really well.

However, I saw a problem: When cloning the repository on the Windows box, some files are modified while switching the branches. For example, I do this: / P>

  git clone svn: //our.git.server/foo git position # Everything is clean GIT checkout - original / maintenance # maintenance branch switch to GIT status # Everything is clean GIT checkout Master # Back Master Branch GIT Status # Some files are modified !  

While doing a 'git diff', I think that the modified files do not show anything at their line end. While doing a little research, we noticed that these files are sub-versions In the CR-LF line end (instead of the end of the LF line) was checked by mistake, and this bug was converted into our GIT repository.

Is there any way to fix this problem in our repository (so far it was not cloned too many times, so 'cleanup committ' or 'without liking') would it be okay to write some history? Maybe we can quietly rewrite the affected items in any way?

Alternatively, we can fix it in Subversion - and then re-issue the 'git svn clone' command. It starts to work incrementally (it will decide the last line now fixed) but again - it makes a commitment I wonder if I can get around it.

It was found that the easiest way was to fix the faulty files in subversion, and then

  git svn clone - stdlayout - author-file = ourcommitters.txt svn: //svn.internalserver.com  

Comments

Popular posts from this blog

MySql variables and php -

url rewriting - How to implement the returnurl like SO in PHP? -

Which Python client library should I use for CouchdB? -