auto
This commit is contained in:
parent
8654831d4c
commit
b2ec530a4b
@ -1,25 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
REPO_DIR="/home/cxh/sweeper_truck_ros"
|
||||
|
||||
cd "$REPO_DIR" || { echo "目录不存在: $REPO_DIR"; exit 1; }
|
||||
|
||||
# 配置用户名和邮箱(如果没配置)
|
||||
git config user.name "cxh"
|
||||
git config user.email "zxwl@56.com"
|
||||
|
||||
# 添加所有改动
|
||||
git add .
|
||||
|
||||
# 自动提交,提交信息用当前时间
|
||||
COMMIT_MSG="Auto commit on $(date '+%Y-%m-%d %H:%M:%S')"
|
||||
git commit -m "$COMMIT_MSG"
|
||||
|
||||
# 推送到远程 main 分支
|
||||
git push origin master
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "推送成功!"
|
||||
else
|
||||
echo "推送失败!"
|
||||
fi
|
||||
Loading…
Reference in New Issue
Block a user