How to ignore certain files in Git

The problem is that .gitignore ignores just files that weren’t tracked before (by git add). Run git reset name_of_file to unstage the file and keep it. In case you want to also remove the given file from the repository (after pushing), use git rm –cached name_of_file.

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

.gitignore exclude folder but include specific subfolder

If you exclude application/, then everything under it will always be excluded (even if some later negative exclusion pattern (“unignore”) might match something under application/). To do what you want, you have to “unignore” every parent directory of anything that you want to “unignore”. Usually you end up writing rules for this situation in pairs: … Read more

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