Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Warning: LF will be rep;laced by CRLF in [PROJECT FILE]

Discussion in 'Getting Started' started by BrewNCode, Feb 6, 2020.

  1. BrewNCode

    BrewNCode

    Joined:
    Feb 17, 2017
    Posts:
    372
    [SOLVED]
    Hello people who know it all. I'm having a problem with my repository, mostly with my Github Desktop. The problem appears in the image attached to the post. Every time that I save some new updates in my project and want to create a new commit, that error appears. I have to close the program and restart my computer in order to commit to master successfully. Has someone experienced something like that? How did you guys solved it? IS there are some new .gitignore files that I have to implement in the Unity gitignore?


    How can I solve this? GitProblem.PNG
     
    Last edited: Nov 21, 2020
  2. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    That's not an error. It's just a warning, explaining what git is doing to your files in case you care. You almost certainly don't, so ignore it.
     
  3. BrewNCode

    BrewNCode

    Joined:
    Feb 17, 2017
    Posts:
    372
    I wish to ignore it but it won't let me commit to my repository. So I don't know what to do with that warning.
     
  4. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    The real error is at the bottom: it's trying to process Temp/UnityLockfile, and is unable to do so. But it shouldn't be doing that anyway; you need to tell git to ignore that whole directory (and some others; see the manual).
     
  5. BrewNCode

    BrewNCode

    Joined:
    Feb 17, 2017
    Posts:
    372
    Alright, I think I got it. I had to manually set the Temp/UnityLockfile to the.gitignore. Going to advanced a bit more in my project and see if that is the problem.
     
    JoeStrout likes this.
  6. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    You really need to .gitignore the entire Temp directory. As well as Library, and any other directory at that level that is not Assets, Packages or ProjectSettings.
     
  7. Bill_Martini

    Bill_Martini

    Joined:
    Apr 19, 2016
    Posts:
    445
  8. BrewNCode

    BrewNCode

    Joined:
    Feb 17, 2017
    Posts:
    372
    carpe_die_m and JoeStrout like this.
  9. FLCordis22

    FLCordis22

    Joined:
    Oct 16, 2023
    Posts:
    1