Search code examples
angularjsgitatlassian-sourcetree

New Angular project missing the app folder


I noticed that a newly-setup Angular project was not registering the changes inside its src/app folder, so I looked at the project's .gitignore file, but there is nothing that is causing the whole app directory to be ignored...

Searching for the term 'app' returns the following, but they cannot be responsible, right?

AppPackages/
App/[pP]layers/

Regardless, I commented them out, but no change.

When I try to add the app folder in GitBash, I get the following:

$ git add app/
The following paths are ignored by one of your .gitignore files:
myAngularApp/src/app

I am confused what is causing this directory to be ignored. Can someone please help me understand what I am missing?


Solution

  • Simply try to check which rule of which .gitignore is the cause for this error, using git check-ignore:

    cd /path/to/repository
    git check-ignore -v -- app/aFile_inside_app
    

    That will give you a better idea of what is going on.

    The OP CatarinaRuna confirms:

    The command revealed that [Aa]pp/ in my .gitignore was the cause, but it wouldn't show up in my search, because I only looked for app : )