Initial commit

This commit is contained in:
Sthope 2023-08-28 21:02:58 +02:00
parent 6881719f7e
commit 14279f63eb

17
sthope/git_commit Normal file
View File

@ -0,0 +1,17 @@
#!/bin/bash
commit_message="Initial commit"
# Iterate through the arguments to find the --b flag and a branch name
for ((i=1; i<=$#; i++)); do
if [[ "${!i}" == "--commit_msg" && ! -z "${!((i+1))}" ]]; then
commit_message=="${!((i+1))}"
break
fi
done
git add .
git commit -m "$commit_message"
git push --set-upstream origin main