Skip to content

Commit 850c75b

Browse files
committed
refactor(add default choice bash)
1 parent baad91d commit 850c75b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

git_auto

+3
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,11 @@ git add .
1717
git commit -m "$commit_message"
1818

1919
while true; do
20+
printf "\n"
2021
printf "[1] Confirm\n[2] Change commit\n"
2122
read -p "Enter your choice? (1: Default)" choice
23+
printf "\n"
24+
choice=${choice:-1} # Set default choice to 1 if Enter is pressed
2225
case $choice in
2326
1)
2427
echo "Pushing changes to the $branch branch..."

0 commit comments

Comments
 (0)