我在〜/ repositories / foo中处于新的git repo中。我的.gitattributes看起来像这样:
*.txt mycrypt
我的.git / config看起来像这样:
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
ignorecase = true
precomposeunicode = true
[filter "mycrypt"]
clean = tee /Users/matthew/temp/mycrypt.before.txt | openssl enc -base64 -pass pass:secret | tee /Users/matthew/temp/mycrypt.after.txt
我执行以下操作,但是我的过滤器从未被调用(当我列出目录〜/ temp时,我看不到任何mycrypt。*文件。)。为什么?
mkdir ~/temp # just for good measure
echo goo > goo.txt
git add goo.txt
git commit -m 'goo'
您缺少的第一件事就是应用过滤器。在中.gitattributes
,而不是:
*.txt mycrypt
你要:
*.txt filter=mycrypt
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句