How to remove files that are listed in the .gitignore but still on the repository?

You can remove them from the repository manually: git rm –cached file1 file2 dir/file3 Or, if you have a lot of files: git rm –cached `git ls-files -i -c –exclude-from=.gitignore` But this doesn’t seem to work in Git Bash on Windows. It produces an error message. The following works better: git ls-files -i -c –exclude-from=.gitignore … Read more

How do I ignore files in a directory in Git?

PATTERN FORMAT A blank line matches no files, so it can serve as a separator for readability. A line starting with # serves as a comment. An optional prefix ! which negates the pattern; any matching file excluded by a previous pattern will become included again. If a negated pattern matches, this will override lower … Read more

Comments in .gitignore?

Yes, you may put comments in there. They however must start at the beginning of a line. cf. http://git-scm.com/book/en/Git-Basics-Recording-Changes-to-the-Repository#Ignoring-Files The rules for the patterns you can put in the .gitignore file are as follows: – Blank lines or lines starting with # are ignored. […] The comment character is #, example: # no .a files … Read more

Gitignore not working

The files/folder in your version control will not just delete themselves just because you added them to the .gitignore. They are already in the repository and you have to remove them. You can just do that with this: Remember to commit everything you’ve changed before you do this! git rm -rf –cached . git add … Read more

Remove directory from remote repository after adding them to .gitignore

The rules in your .gitignore file only apply to untracked files. Since the files under that directory were already committed in your repository, you have to unstage them, create a commit, and push that to GitHub: git rm -r –cached some-directory git commit -m ‘Remove the now ignored directory “some-directory”‘ git push origin master You … Read more

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