Skip to content

Commit

Permalink
default commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
WhatMe1on committed Dec 5, 2024
1 parent 74c5875 commit 8e9063f
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions gitACP.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
#/bin/bash!
git add . &&\
git commit -m "add" &&\
#!/bin/bash

# 设置默认的 commit message
DEFAULT_MSG="default commit message"

# 使用传入的参数作为 commit message,否则使用默认值
COMMIT_MSG="${1:-$DEFAULT_MSG}"

# 执行 git 操作
git add . && \
git commit -m "$COMMIT_MSG" && \
git push

0 comments on commit 8e9063f

Please sign in to comment.