Reputation: 55
In my local folders the .gitignore
does not show up (like I was told it would Learning Ruby on Rails Tutorial), so I made one using Sublime Text. But when I uploaded the files to Git, suddenly it appeared. Now I have two .gitignore
s on Git, but still only 1 shows in local files. Can anyone explain how to resolve this difference?
Screenshot:
Upvotes: 0
Views: 46
Reputation: 38645
.gitignore
is a dot
file which implies that it's hidden file. To list all the files including hidden files in the current directory issue the following command in your terminal:
$ ls -al
You don't have two .gitignore
s, you have one without the dot
prefix and the other with dot
prefix. You should add the difference of gitignore
and .gitignore
to .gitignore
(the one with the dot
prefix) then safely remove the gitignore
(the one without dot
).
Upvotes: 2
Reputation: 4330
This is because . files are hidden. This called dot files.
If you are on Linux or Mac just use ls -la
to show all files.
Or on Windows dir
should do the same.
Upvotes: 0