[英]Ignore all files except in subfolder
我有一个包含许多文件和文件夹的git repo,但我想忽略src文件夹中除文件和文件夹之外的所有内容。
这是我的.gitignore:
/*
!**/src/
!.gitignore
!README.md
但这是git status返回的内容:
$ git status
On branch master
Initial commit
Untracked files:
(use "git add <file>..." to include in what will be committed)
.gitignore
README.md
nothing added to commit but untracked files present (use "git add" to track)
因此,似乎它正在忽略一切,包括我的src文件夹。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.