We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
多人可以共同操作的服务器上,某个域名对应的文件夹下,不同的人都会往里面上传网站代码及相关文件。
为了自己开发方便,干脆把文件夹下的所有子文件夹和文件都默认忽略掉,只追踪自己用来放网站的子文件夹和文件,相当于开启白名单模式。
用的 .gitignore all folders except 这个关键词,一搜就搜到想要的结果了:How do I tell Git to ignore everything except a subdirectory?。
.gitignore all folders except
下面的代码就是默认忽略根目录下的所有文件和文件夹,只追踪 bin 文件夹下的变更:
/* /*/ !/bin/
The text was updated successfully, but these errors were encountered:
No branches or pull requests
需求描述
多人可以共同操作的服务器上,某个域名对应的文件夹下,不同的人都会往里面上传网站代码及相关文件。
为了自己开发方便,干脆把文件夹下的所有子文件夹和文件都默认忽略掉,只追踪自己用来放网站的子文件夹和文件,相当于开启白名单模式。
解决过程
用的
.gitignore all folders except
这个关键词,一搜就搜到想要的结果了:How do I tell Git to ignore everything except a subdirectory?。下面的代码就是默认忽略根目录下的所有文件和文件夹,只追踪 bin 文件夹下的变更:
The text was updated successfully, but these errors were encountered: