Meaning of leading slash in `.gitignore` file

This is the documentation text: A leading slash matches the beginning of the pathname. For example, “/*.c” matches “cat-file.c” but not “mozilla-sha1/sha1.c”. These are my guesses: If you use an in-repository-.gitignore, the directory in which the .gitignore is located – it is not really useful to make it relative to the repository root. A short … Read more

git excludes vs ignores

It’s a list of files that are not in .gitignore (which can be versioned), but which you want to exclude on your machine’s copy of the repo. From the docs: Patterns which are specific to a particular repository but which do not need to be shared with other related repositories (e.g., auxiliary files that live … Read more

What’s the difference between .npmignore and .gitignore?

.gitignore lists which files & folders should be omitted from any commits to the repository. You can use this repo for templates of files/folders to in your .gitignore depending on your environment. .npmignore works similarly to .gitignore, it is used to specify which files should be omitted when publishing the package to NPM. You can … Read more

How to ignore files starting with numbers in Git?

Git does not use regexp but glob pattern to match ignored files. Add the following line in your root .gitignore: [0-9]* If you only want to ignore those files in the /static/img/ subdirectory you should either add the previous line to .gitignore file inside that subdirectory or add the following line in your root .gitignore: … Read more

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