Git Ignore

The types of files you should consider adding to a .gitignore file are any files that do not need to get committed.
You may not want to commit them for security reasons or because they are local to you and therefore unnecessary for other developers working on the same project as you. like Folders generated by package managers, such as npm’s node_modules folder. This is a folder used for saving and tracking the dependencies for each package you install locally.

Will provide some information about – How to Ignore a File and Folder in Git

If you want to ignore only one specific file, you need to provide the full path to the file from the root of the project.For example, if you want to ignore a text.txt file located in the root directory, you would do the following:
/text.txt

And if you wanted to ignore a text.txt file located in a test directory at the root directory, you would do the following:
/test/text.txt

To ignore an entire directory with all its contents, you need to include the name of the directory with the slash / at the end: test/

you want to ignore all files and directories that have a name starting with img. To do this, you would need to specify the name you want to ignore followed by the * wildcard selector like so: img*

Leave a comment

Your email address will not be published. Required fields are marked *