Sublime Forum

Force set Line Ending to `unix` on Windows 10

#1

Hi, i am using Windows 10 version 1089 LTSC and Sublime text 3 dev build 3210.

I have 2 Sourcetree brandes in my project: master and dev, set Line Ending to Unix to both
And setting: "default_line_ending": "unix"
But, every time I switch branches, Line Ending goes back to windows (CRLF) instead of unix (LF)

So, how can i set Line Ending to unix to every time?
Thanks.

0 Likes

#2

How did you set line ending on branches?
Usually setting in a .gitattributes:

* text=auto
*.* text eol=lf

forces line endings to be Unix stye on all systems.

1 Like

#3

I added .gitattributes file as far as you said but it still doesn’t work.
Add to path: C:\Users\admin\Documents\Pojects\my-project\.git\info follow the instructions here
On my macOS, it’s still that project but everything is working smoothly ( I have macbook with boot camp )
Once again please help :expressionless:

0 Likes

#4

if you haven’t used gitattributes before, I’d suggest to read the git docs.
While stackoverflow may be helpfull, you better understand the basics first.

2 Likes

#5

$ git config --global core.autocrlf input
This configuration works for me, many thank!

0 Likes