问题描述
我有一个 devlog
文件夹,我可以在其中写下我喜欢用 git status
查看的想法/示例代码。排除这些文件后,我通常只能git add .; git commit
,但显然devlog
中的内容禁止这样做。我喜欢有一个 git 钩子,它会在提交之前取消整个路径及其内容。
我试过了:
git rm --cached devlog/*
但显然,它希望 ./devlog
的所有内容都已经上演(包括那些被 .gitignore
忽略的内容),因此会引发错误:
git rm --cached devlog/*
#> fatal: pathspec 'devlog/check.log' did not match any files
其中 devlog/check.log
被忽略并且根本没有上演。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)