0

I have three folders protected/ themes/ public/ but only protected/ is showing up in git ls-files

I tried git add public/, nothing happen, git status still shows me "nothing to commit, working directory clean". I confirmed these two folders are not ignored.

Nothing shows up when I do git ls-files --others --exclude-standard

What's wrong? How can I add these two folders to index or re-index the whole repo?

user1735940
  • 123
  • 1
  • 7

1 Answers1

3

You can't add directories to a git repository, only files. As far as git is concerned directories only exist as components of a file's path.

See also How can I add an empty directory to a Git repository?

Community
  • 1
  • 1
Andreas Bombe
  • 2,450
  • 13
  • 20