I noticed that in a newly created git repo, directories like __pycache__
or .svn
are already ignored. I don't remember configuring git to ignore these directories. How can I view the list of patterns that are currently ignored by git? I'm using git v2.1.3.
git folder is ignored by default. All others are deamed potentially important for the source-base unless configured otherwise within the repository or at a global level.
All of your Git repositories will ignore the files and folders listed in the global . gitignore file.
The . gitignore file tells Git which files to ignore when committing your project to the GitHub repository. gitignore is located in the root directory of your repo.
A . gitignore file is a plain text file that contains a list of all the specified files and folders from the project that Git should ignore and not track. Inside . gitignore , you can tell Git to ignore only a single file or a single folder by mentioning the name or pattern of that specific file or folder.
Note that git ignores empty directories - it just cannot store them. Also you can check if there's global gitignore created in your system (~/.gitignore_global
)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With