![]() If you are using tocrlf = true, then in repo (TFS) all files are stored with LF, while on checkout GIT converts them to CRLF. Here is master (merging into master NOTE: this file is CRLF BEFORE merging, upon merging the CRLFs must be being converted to LF): I'm not sure how I can bulk fix this though? I though my initial repository refreshes I listed above would do this, apparently not. the branch i'm merging FROM is using CRLF's, the branching i'm merging INTO is using LF's - so it does appear to be and EOL issue. I did a merge, then opened a conflicting file and this is what i found. OK - so I think i may be on to something here. I've added this handy End of Line Visual Studio Extension that shows the files EOL characters so I can see all the EOL characters right in the merge / diff screen and it appears they match exactly between the files. I've copied the said "conflicting" two files out from Visual Studio, each into their own Notepad++ windows with "show symbols -> show end of line" turned on - then I compared both "conflicting" files and as you can see there is NO difference in the line endings (both files contain the exact same CR/LF's as shown in the image below) - so i'm guessing that VS is doing its EOL conversion or something? OR when I copy it out into Notepad++ its doing some sort of EOL conversion? Not sure if this helps at all. I'm at my wits end, going through countless SO questions/answers - googling, to no avail - my conflict count continues to rise.Īlso note: I'm using GIT on TFS - not sure if this changes things. git/config file (not including branch refs) The problem is, as I continue to do the above in hopes of fixing and normalizing these line branches across the two branches I end up with even MORE conflicts than previously - all due to line ends: I've also checked and my global tocrlf is equal to true (since all our devs are using Visual Studio on Windows) Here is my gitattributes # Auto detect text files and perform LF normalization When I refreshed both repositories there were no changes to commit, even though the instructions stated there would be changes to commit (essentially the changes being from the EOL conversions). I've added a gitattributes file on both branches that looks and performed a repository refresh on both repositories. The branches seem to have line ending issues because when I open up the conflict window in Visual Studio its showing 0 conflicts and 0 differences between numerous files. I'm having a difficult time trying to properly merge to branches.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |