update at 2025-09-17 17:16:01
This commit is contained in:
8
run.sh
8
run.sh
@@ -1,8 +0,0 @@
|
||||
touch README.md
|
||||
git init
|
||||
git checkout -b main
|
||||
git add README.md
|
||||
git commit -m "first commit"
|
||||
git remote add origin https://biboer.cn/gitea/gavin/devops.git
|
||||
git push -u origin main
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
git add .
|
||||
git commit -m "devops"
|
||||
git push origin master
|
||||
20
rungit.sh
Executable file
20
rungit.sh
Executable file
@@ -0,0 +1,20 @@
|
||||
|
||||
#!/bin/bash
|
||||
|
||||
# 自动添加所有修改
|
||||
git add .
|
||||
|
||||
# 如果没有提交信息,默认用时间戳
|
||||
msg="update at $(date '+%Y-%m-%d %H:%M:%S')"
|
||||
|
||||
# 支持自定义提交信息:./run.sh "your message"
|
||||
if [ $# -gt 0 ]; then
|
||||
msg="$*"
|
||||
fi
|
||||
|
||||
# 提交
|
||||
git commit -m "$msg"
|
||||
|
||||
# 推送到远程 main 分支
|
||||
git push origin main
|
||||
|
||||
Reference in New Issue
Block a user