简体   繁体   中英

Folder not showing on github, but is present in git

I have a project where a non-empty folder is displaying on my local file system, but is not present in github. It did not always used to be like this. I am not ignoring this folder. I know that git doesn't let you add empty folders. What could possibly be the problem? I tried re-adding it but its acting as if it were ignored. What can I do to troubleshoot?

When trying to figure out why something is ignored, it is often useful to use the git check-ignore command:

$ git check-ignore --verbose some/file.txt
.gitignore:1:some   some/file.txt

The output can be interpreted like so:

If --verbose is specified, the output is a series of lines of the form:

 <source> <COLON> <linenum> <COLON> <pattern> <HT> <pathname> 

<pathname> is the path of a file being queried, <pattern> is the matching pattern, <source> is the pattern's source file, and <linenum> is the line number of the pattern within that source. If the pattern contained a ! prefix or / suffix, it will be preserved in the output. <source> will be an absolute path when referring to the file configured by core.excludesfile , or relative to the repository root when referring to .git/info/exclude or a per-directory exclude file.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM