github desktop not showing folders

Viewed 1570

I made changes on the folder called "client/" but they are not shown in GitHub Desktop, thus I can push it to my repository:

changes

Inside there is a .gitignore file, and I have tried deleting it but even so the "client/" folder did not appear.

client

Here is the content in gitignore file.

/node_modules
/.pnp
.pnp.js

# testing
/coverage

# production
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*

How can I see changes in client/?

1 Answers

First, you can check if any .gitignore rule applies to your change (therefore ignoring said change) with:

git check-ignore -v -- client/my/changed/file

If it does return anything, any modification to that file would be ignored.

Second, check if client is a nested Git repository (meaning, with a client/.git subfolder): that would also explain why a change in that nested repository is not shown when GitHub Desktop display the parent repository.

The OP Henry mentions in the comments:

git check-ignore -v client/node_modules`  
fatal: Pathspec 'client/node_modules' is in submodule 'client' , so did other folders

That means it is a git submodule which is declared in the parent repository, in the .gitmodules.

The client folder, therefore, is supposed to be empty on the GitHub parent repository: it is a gitlink, a special entry in the index, referencing the tree SHA of that submodule repository.

Related