1

I don't know if I should write here or StackOverflow, but I recently switched from Windows to MacOS and plugged in the eHDD which had my website projects on there. I forgot to push the updated code to git before moving so I wanted to do that now.

The problem is when I open the folder, it shows that every single line is modified and all files are modified.

Is this a permissions issue or something?

The eHDD is formatted as NTFS, but the projects were extracted from a .zip archive

7
  • What does a diff show as the differences?
    – mmmmmm
    Commented May 25, 2021 at 18:34
  • @mmmmmm Every single line of every file. Even though there’s literally only 2 files changed. (5 lines max)
    – HenrijsS
    Commented May 25, 2021 at 18:36
  • If we can't answer it here a mod can move it over. One thought here though. macOS can read NTFS fine but it can't write to it without a 3rd party tool. Don't know if that helps but I thought I'd throw it out just in case... Commented May 25, 2021 at 18:42
  • OK thought so - my guess is line endings - MS uses CR LF and macOS/Unix just CR. There are many questions re git and line endings. Unfortunately the usual way is have windows git push as LF and most answers seem to work with that ie changing from Unix to Windows is more documented. So I can't provide a quick answer you'll have to do a deeper hunt
    – mmmmmm
    Commented May 25, 2021 at 18:42
  • 1
    The other way is convert the line endings on the checked out files. On old Unix system dos2unix and unix2dos were common but not there on BigSur Or just do the chnage in the editor most have command to convert the endings
    – mmmmmm
    Commented May 25, 2021 at 18:44

1 Answer 1

1

Seems like a duplicate here.

Resolved the issue hard reseting the staged files: https://stackoverflow.com/a/41041699/12034488

Which is taken from https://docs.github.com/en/get-started/getting-started-with-git/configuring-git-to-handle-line-endings which explains the issue and the fix.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .