Skip to content

Commit 0c8adfa

Browse files
committed
-
1 parent 0a96a5f commit 0c8adfa

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

git-commit-push-script.sh

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/bin/bash
2+
3+
# Create the alias
4+
alias cm='
5+
6+
# Add all changes
7+
git add -A
8+
9+
# Extract ticket number from current directory
10+
ticket=$(pwd | grep -oE "CRS-[0-9]+" | head -n 1)
11+
12+
# Prompt for commit message
13+
read -p "Enter commit message: " message
14+
15+
# Prepare and execute commit command
16+
git commit -S -m "$ticket - $message"
17+
18+
# Push changes
19+
git push
20+
'

0 commit comments

Comments
 (0)