[英]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.