helengutz
helengutz

Reputation: 55

.gitignore not on local server but shows on Git Repository

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 .gitignores on Git, but still only 1 shows in local files. Can anyone explain how to resolve this difference?

Screenshot:

Upvotes: 0

Views: 46

Answers (2)

vee
vee

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 .gitignores, 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

Sir l33tname
Sir l33tname

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

Related Questions