I have a project structure thus:
.git
.gitignore
Project/
----File1 (resides in Project/ folder)
.gitignore
originally was empty. So, Project/
and File1
were tracked and committed into source control. Since then, I modified File1
. Now, I add the following line in .gitignore
:
Project/
in hopes that the entire folder Project
and all of its files/subdirectories are "ignored" by git. Yet, this does not happen. git status
now still responds with:
modified: Project/File1
The above is also the response with an empty .gitignore
. So, it is unclear to me what the effect is of adding Project/
to .gitignore
. What exactly is being ignored if git status
responds similarly in both cases?