Why can't I add this directory to git?

$ git add . ; git add *; git status # On branch master nothing to commit (working directory clean) 

My folder is there, but I can’t add it.

+4
source share
4 answers

Anyway, is the directory empty? You cannot add directories to git.

+6
source

I know this question is quite old and the answer was accepted, but I had a similar problem when I could not add the directory.

In my case, the problem was that I did not have permission to access the directory. I changed the permissions and then was able to add it.

+3
source

Are there any hidden files in your folder? This may cause the git process to not see the files and treat the folder as if it is empty.

0
source

I have the same problem and the reason was added in the github .gitignore file, which in my case did not track .exe files.

0
source

Source: https://habr.com/ru/post/1337405/


All Articles