PROJECTS NOTES HOME

Fix characters appearing in org files

So I was storing some .org files on windows machine and making a symlink from nixos - notes -> mnt/c/Users/arvydas/OneDrive/Documents/GIT/notes.

So basically stored files on Windows and used them in WSL(nixos). Did all the commits to those files from nixos also.

One day I have opened magi and wanted to check untracked files - there were hundreds of them, because each file had ^M character added to them. They were invisible in the .org file, but visible in git.

Researched a bit, saw these:

At first I thought it was an Emacs thing, but apparently it is Git thing. So adding this line to my terminal once:

git config --global core.autocrlf input

Has fixed the problem. The ^M's are now ignored and I can see the actual changes to the files.

Yay!