Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

.gitignore blank in Windows Explorer

Why is my .gitignore file blank in Windows (7) Explorer?

Note that both the .htaccess file and the .git folder appear as expected.

See:

enter image description here

like image 476
Snowcrash Avatar asked Apr 09 '15 15:04

Snowcrash


People also ask

How do I see .gitignore file in Windows?

GITIGNORE files are plain text files, meaning you can open one with any program that can read text files. If you're on Windows, you can use the built-in Notepad program, or Notepad++.

Is .gitignore a file or 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.

Where should .gitignore be placed?

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. / will ignore directories with the name.


1 Answers

That is because Windows think that .gitignore is a file extension and hide the extension. And when there is nothing before the . its empty.

Here is an image with shows how to change it in the settings.

http://i.stack.imgur.com/pPYB8.png

like image 94
René Höhle Avatar answered Oct 09 '22 01:10

René Höhle