Git replacing LF with CRLF

These messages are due to an incorrect default value of core.autocrlf on Windows. The concept of autocrlf is to handle line endings conversions transparently. And it does! Bad news: the value needs to be configured manually. Good news: it should only be done one time per Git installation (per project setting is also possible). How … Read more

Create Git branch with current changes

If you hadn’t made any commit yet, only (1: branch) and (3: checkout) would be enough. Or, in one command: git checkout -b newBranch With Git 2.23+ (Q3 2019), the new command git switch would create the branch in one line (with the same kind of reset –hard, so beware of its effect): # First, … Read more

Global Git ignore

You need to set up your global core.excludesfile configuration file to point to this global ignore file e.g: *nix or Windows git bash: git config –global core.excludesFile ‘~/.gitignore’ Windows cmd: git config –global core.excludesFile “%USERPROFILE%\.gitignore” Windows PowerShell: git config –global core.excludesFile “$Env:USERPROFILE\.gitignore” For Windows it is set to the location C:\Users\%username%\.gitignore. You can verify that … Read more

Filename too long in Git for Windows

Git has a limit of 4096 characters for a filename, except on Windows when Git is compiled with msys. It uses an older version of the Windows API and there’s a limit of 260 characters for a filename. So as far as I understand this, it’s a limitation of msys and not of Git. You … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)