Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What files/directories does git ignore by default?

Tags:

git

gitignore

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.

like image 522
planetp Avatar asked Nov 03 '14 11:11

planetp


People also ask

Does Git ignore any files by default?

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.

What files are ignored by Git?

All of your Git repositories will ignore the files and folders listed in the global . gitignore file.

Which file stores the files/folders to be ignored by Git?

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.

Does Git ignore folder?

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.


1 Answers

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)

like image 175
Maciej Baranowski Avatar answered Sep 22 '22 07:09

Maciej Baranowski