How do .gitignore exclusion rules actually work?

/a/b/c/* !foo Seems to work for me (git 1.7.0.4 on Linux). The * is important as otherwise you’re ignoring the directory itself (so git won’t look inside) instead of the files within the directory (which allows for the exclusion). Think of the exclusions as saying “but not this one” rather than “but include this” – … Read more

How to git ignore ipython notebook checkpoints anywhere in repository

If you add to .gitignore: .ipynb_checkpoints (no slashes anywhere), any file or directory in the repo with that name will be ignored. Paths are only checked if you include /. From this answer you can also have a global gitignore for your computer: git config –global core.excludesfile ‘~/.gitignore’ echo ‘.ipynb_checkpoints’ >> ~/.gitignore

Keep ignored files out of git status

As I found in this post, .gitignore only works for untracked files. If you added files to repository, you can: git update-index –assume-unchanged <file> or remove them from repository by git rm –cached <file> Edit This article explains that too

Git: How to remove file from index without deleting files from any repository

I do not think a Git commit can record an intention like “stop tracking this file, but do not delete it”. Enacting such an intention will require intervention outside Git in any repositories that merge (or rebase onto) a commit that deletes the file. Save a Copy, Apply Deletion, Restore Probably the easiest thing to … Read more

.gitignore not ignoring .idea path

.gitignore only ignores newly added (untracked) files. If you have files that have already been added to the repository, all their changes will be tracked as usual, even if they are matched by .gitignore rules. To remove that folder from the repository (without deleting it from disk), do: git rm –cached -r .idea

gitignore binary files that have no extension

# Ignore all * # Unignore all with extensions !*.* # Unignore all dirs !*/ ### Above combination will ignore all files without extension ### # Ignore files with extension `.class` & `.sm` *.class *.sm # Ignore `bin` dir bin/ # or */bin/* # Unignore all `.jar` in `bin` dir !*/bin/*.jar # Ignore all `library.jar` … Read more

Add .gitignore to gitignore

The .gitignore file’s purpose is to prevent everyone who collaborates on a project from accidentally commiting some common files in a project, such as generated cache files. Therefore you should not ignore .gitignore, since it’s supposed to be included in the repository. If you want to ignore files in just one repository but want to … Read more

When would you use .git/info/exclude instead of .gitignore to exclude files?

The first advantage of .gitignore is that it is versioned into the repository itself, unlike .git/info/exclude. The second advantage is that you can have multiple .gitignore files, one per directory/subdirectory, for directory specific ignore rules, unlike .git/info/exclude. So the .gitignore files are versioned and present across all clones of the repository. Therefore, in large teams … Read more

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