0

I have project on my windows running through wsl2, when i pushed the code to github and then clone that project on linux for deployment it shows all the file in modified stage. how can handle this situation?

1 Answers1

1

Very few traces of the actual problem here...

My guess:
line feeds in the files are Windowzy CR+LF
Linux uses LF only.
WSL: unknown entity in this regard.

Recommendation: Set your Windows or WSL file editor to use LF-only.

"Fix", on Ubuntu: Install and use dos2unix
$ sudo apt install dos2unix

for every file to be used on Linux, run dos2unix

e.g. find -exec dos2unix

Hannu
  • 6,605
  • 1
  • 28
  • 45