admin管理员组文章数量:1289556
I need a gitignore that ignores basically all folders with a few exceptions. I have 4 folders that needs to be sync with git 3 of them start like this :
RCU*/
And another folder named Tools. For example :
I need to ignore all folders except :
- RCUFromUR
- RCUToB360
- RCUToUR
- Tools
Every other folders than these needs to be ignored (and other folders will be added), is there a way to achieve this ?
Thanks
I need a gitignore that ignores basically all folders with a few exceptions. I have 4 folders that needs to be sync with git 3 of them start like this :
RCU*/
And another folder named Tools. For example :
I need to ignore all folders except :
- RCUFromUR
- RCUToB360
- RCUToUR
- Tools
Every other folders than these needs to be ignored (and other folders will be added), is there a way to achieve this ?
Thanks
Share Improve this question asked Feb 20 at 16:20 Emile DadouEmile Dadou 5544 silver badges25 bronze badges1 Answer
Reset to default 2# Ignore all directories except specific ones
/*
!/RCUFromUR/
!/RCUToB360/
!/RCUToUR/
!/Tools/
# If you want to exclude subdirectories from being tracked under the above folders, you can add these
!/RCUFromUR/*/
!/RCUToB360/*/
!/RCUToUR/*/
!/Tools/*/
本文标签: gitgitignoreignore folders that doesn39t respect a specific maskStack Overflow
版权声明:本文标题:git - gitignore - ignore folders that doesn't respect a specific mask - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741422000a2377859.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论