I just did a git init
on the root of my new project.
Then I created a .gitignore
file.
Now, when I type git status
, .gitignore file appears in the list of untracked files. Why is that?
I just did a git init
on the root of my new project.
Then I created a .gitignore
file.
Now, when I type git status
, .gitignore file appears in the list of untracked files. Why is that?
Watch out for the following "problem" Sometimes you want to add directories but no files within those directories. The simple solution is to create a .gitignore with the following content:
This seams to work fine until you realize that the directory was not added (as expected to your repository. The reason for that is that the .gitignore will also be ignored, and thereby the directory is empty. Thus, you should do something like this: