git 提交的时候能不能自动忽略大文件(比如超过 100M ),然后给个提示消息就好了。
|
1
100M 是为了上传 github?
感觉可以用 find 把所有大文件写进 gitignore,要自动就写个 hook, |
|
no1xsyzyJun 24, 2021
2
pre-commit 钩子里插 find 语句并 >> .gitignore
|
|
4
顺便,如果要 lfs 的话也可以 | xargs git lfs track
|
|
no1xsyzyJun 24, 2021
5
(忘记了钩子运行时机晚于 add,pre-commit 里写的话大概需要 unstage 一下)
|
|
ChemistJun 24, 2021 via iPhone
6
git 版冰点还原吗😂
|
|
misaka19000Jun 24, 2021
7
把大文件添加到 ignore 里面去
或者写个脚本在提交前自动检测文件大小修改 ignore 文件 |
|
jomenxiaoJun 24, 2021
8
alias git="find . -type f -max < 100 && git"
|