Note that there are some explanatory texts on larger screens.

plurals
  1. POGIT complains about randomly changed files when switching branches
    primarykey
    data
    text
    <p>Starting from </p> <pre><code>git status # On branch master nothing to commit, working directory clean </code></pre> <p>and then switching to another branch</p> <pre><code>git checkout somebranch </code></pre> <p>after switching to a new branch and running a <code>git status</code> git will sometimes complain about randomly changed files. If i diff the files with <code>git diff</code> it will display the whole files first with all lines being removed and then added again</p> <pre><code>- someline - someotherline + someline + someotherline </code></pre> <p>Then running a <code>git diff --ignore-space-at-eol .</code> will not show any files changed leading me to believe there is line ending issues somewhere inside the git repo because if I do a binary comparison of the files with my merge tool of choice (Beyond Compare) it tells me that the files are binary the same even though git complains about them being different, hell I even did a hex compare and they where indeed identical, so why does git see them as changed?</p> <p>The repository was on old svn repository that was converted by following the github guidelines <a href="https://help.github.com/articles/importing-from-subversion">https://help.github.com/articles/importing-from-subversion</a> and after that we added our .gitattributes file to the solution which looks like this:</p> <pre><code># .gitattributes # Auto detect text files and perform LF normalization * text=auto # Custom for Visual Studio *.cs diff=csharp *.sln merge=union *.csproj merge=union *.vbproj merge=union *.fsproj merge=union *.dbproj merge=union # Standard to msysgit *.doc diff=astextplain *.DOC diff=astextplain *.docx diff=astextplain *.DOCX diff=astextplain *.dot diff=astextplain *.DOT diff=astextplain *.pdf diff=astextplain *.PDF diff=astextplain *.rtf diff=astextplain *.RTF diff=astextplain </code></pre> <p>After adding the .gitattributes file we also followed githubs guide to fixing line endings from <a href="https://help.github.com/articles/dealing-with-line-endings">https://help.github.com/articles/dealing-with-line-endings</a> </p> <p>Everyone on the team is running on windows, everyone on the team is using core.autocrlf=true and everyone is using at least</p> <pre><code>git --version git version 1.8.3.msysgit.0 </code></pre> <p>What could be wrong here? The files git complains about is completely random and it happens for everyone across the team. Also it is impossible to revert the files it complains about with a git checkout file-that-hasnt-really-changed.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload