Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you change core.autocrlf when using SmartGit?

I don't have any experience with version control from the terminal but as far as I can tell SmartGit does not have a terminal nor does it use an external git client that I could configure via terminal so I don't really see how I can execute git configuration commands on it. Specifically, I want to do:

git config --global core.autocrlf true

Does it have an equivalent configuration option available from within the UI or is there some other way to apply this?

like image 742
fordeka Avatar asked Apr 22 '13 15:04

fordeka


People also ask

How do I change from CRLF to LF in git?

text eol=crlf Git will always convert line endings to CRLF on checkout. You should use this for files that must keep CRLF endings, even on OSX or Linux. text eol=lf Git will always convert line endings to LF on checkout. You should use this for files that must keep LF endings, even on Windows.

What does Autocrlf true do?

autocrlf . This is a similar approach to the attributes mechanism: the idea is that a Windows user will set a Git configuration option core. autocrlf=true and their line endings will be converted to Unix style line endings when they add files to the repository.


2 Answers

SmartGit/Hg uses the command line Git which is configured in the Preferences. Both, command line Git and SmartGit/Hg will honor the global core.autocrlf configuration from your .gitconfig file.

like image 137
mstrap Avatar answered Oct 17 '22 04:10

mstrap


If you have problems with terminals, you could also edit the file $HOME/.gitconfig on Linux platforms or C:\Users\%USERNAME%\.gitconfig on Windows, and add the following lines to it:

[core]
    autocrlf = false

Also you can set the default EOL with:

[core]
    eol = lf
like image 40
jotacor Avatar answered Oct 17 '22 05:10

jotacor