How do you specify autocrlf = true for all repositories in SourceTree ?
SourceTree allows you to specify a git config for each repository, so you'd need to manually add autocrlf = true to each config file. Does SourceTree allow you to specify a global git config for all repositories ?
Thanks.
As far as I know, you cannot do this with SourceTree directly - but as usual, git-commandline is your friend:
You've got three levels of .gitconfig - which are stored at different locations
You set options within those three configuration files using a dedicated option:
git config --local/–global/–system ....
See: https://git-scm.com/docs/git-config
Hope that helps
Cheers
Johannes
Yeah, definitely recommend using git config --global, but if any of your repositories have autocrlf set to something else locally, that will take precedence over the global setting.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Seth is right: you have to consider that there is a precedence: local overwrites global overwrites system
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
On Windows 7 (maybe same or similar for Windows 10) for Visual Studio and git command line, your global config is in
%USERPROFILE%\.gitconfig
(dot is in front of the file)
but this is not honored by SourceTree at least in Git Embedded mode, and the config is in
%USERPROFILE%\AppData\Local\Atlassian\SourceTree\git_local\mingw32\etc\gitconfig
(no dot in front of the file)
[I needed to update both files to modify my global git settings for git command and SourceTree]
Here is more that I found about it because some settings are still overridden by some other 'global' config https://stackoverflow.com/a/55839051/1818723
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.