简体   繁体   English

rsync-filter可提交给git

[英]rsync-filter commitable to git

For a linux server i installed rsync, and I want to exclude some folders. 对于linux服务器,我安装了rsync,并且我想排除一些文件夹。 So I added a .rsync-filter file to that folder, containing: 因此,我向该文件夹添加了.rsync-filter文件,其中包含:

+ .rsync-filter
- *

And when I want to commit this files to my git repo, it doesn't show up at uncommitted changes. 当我想将此文件提交到git repo时,未提交的更改不会出现。 What to change, so I can add .rsync-filter to my git repo. 要更改的内容,因此可以将.rsync-filter添加到我的git repo中。

If your .rsync-filter file is ignored somehow by your .gitignore, you can force the add: 如果您的.rsync-filter文件被.gitignore以某种方式忽略,则可以强制添加:

git add -f .rsync-filter

You can also check why your file would be ignored with git check-ignore (git 1.8.3.3.+): 您还可以使用git check-ignore (git 1.8.3.3。+)检查为什么文件会被忽略:

git check-ignore -- .rsync-filter

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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