Github Desktop "warning: LF will be replaced by CRLF"
Using Github Desktop, I create a new repository. I then opened Unity Hub and created a new project inside that repository (using the Git Ignore "Unity" preset), made a few changes to the scene, and attempted to make an initial commit to master using Github desktop, and I get the error (repeated for what appears to be every file in the project):
warning: LF will be replaced by CRLF in DeleteMeProject/Assets/Scenes.meta.
The file will have its original line endings in your working directory
I did some reading on line endings, and tried some git commands suggested here using Repository > Open Repository in Command Prompt, no luck.
Screenshot of the error: Any ideas?
Answer by markasuter · Oct 01, 2019 at 12:20 AM
I figured it out. Because my .gitignore was in a folder (that was created when I created the repo) BESIDE the Unity project folder, I needed to modify the paths in the .gitignore to reflect this so it knew where to look.
Thank you for this dude. I'm new to Unity and this was causing me a headache right from the start. For me, I pulled up all the project files to share the same folder for the git files and the errors went away. But I wouldn't have been able to figure it out without this post. Thanks again
Answer by veesamnareshbabu · Oct 08, 2019 at 12:29 PM
Paste the below code
[core] autocrlf = false [filter "lfs"] required = true clean = git-lfs clean -- %f smudge = git-lfs smudge -- %f process = git-lfs filter-process
https://www.ittechnical.solutions/2019/09/warning-lf-will-be-replaced-by-crlf-in.html?m=1
Answer by DaveLevi · Jun 15, 2020 at 09:35 AM
FWIW I just ran into this on a project I just created. Solved it by simply making a change in the sample scene and saving it (I just created a cube, then deleted the cube).
Answer by Fritsl · Oct 20, 2020 at 07:16 AM
Erhm, you do not need to modify the file / paths, just read the top comment in the file, and move the file into the root of the project as described ;)
Your answer
![](https://koobas.hobune.stream/wayback/20220612212831im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Can't upload project to GitLab 2 Answers
Ragdoll colliders&rigidbodies get removed 0 Answers
*Unknown error occurred while loading* main scene file 1 Answer
Unity not Version Controlling Inspector Settings for GameObjects 1 Answer
Visual Studio / Git / Unity - All files and folders I add are going into untracked files - why? 1 Answer