Commit code. Update time: 2023-06-25

This commit is contained in:
TK
2023-06-25 11:41:40 +08:00
parent eb44d7cf12
commit 31b3e4fc11
3 changed files with 22 additions and 0 deletions
Executable
+19
View File
@@ -0,0 +1,19 @@
#!/bin/bash
# 遍历目录及子目录下所有超过100MB大小的文件
find . -type f -size +100M | while read file; do
# 获取文件名并检查是否已经存在于.gitignore文件中
filename="${file##*/}"
if ! grep "$filename" .gitignore > /dev/null 2>&1 ; then
# 如果文件名不存在于.gitignore文件中,则添加到末尾
echo "$filename" >> .gitignore
fi
done
git add .
date +%F > timefile
currentTime=$(<timefile)
git commit -m "Commit code. Update time: $currentTime "
#git push