-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathgit-commit.sh
executable file
·31 lines (29 loc) · 1.46 KB
/
git-commit.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/usr/bin/env bash
#//////////////////////////////////////////////////////////////
#// ____ //
#// | __ ) ___ _ __ ___ _ _ _ __ ___ _ __ _ __ ___ //
#// | _ \ / _ \ '_ \/ __| | | | '_ \ / _ \ '__| '_ \ / __| //
#// | |_) | __/ | | \__ \ |_| | |_) | __/ | | |_) | (__ //
#// |____/ \___|_| |_|___/\__,_| .__/ \___|_| | .__/ \___| //
#// |_| |_| //
#//////////////////////////////////////////////////////////////
#// //
#// Script, 2021 //
#// Created: 24, July, 2021 //
#// Modified: 25, July, 2021 //
#// file: - //
#// - //
#// Source: https://stackoverflow.com/a/2979587/10152334 //
#// OS: ALL //
#// CPU: ALL //
#// //
#//////////////////////////////////////////////////////////////
if (( $# == 2 )); then
git commit -s -m "$1" -m "$2"
elif (( $# == 1 )); then
git commit -s -m "$1" -m "$1"
else
echo "Usage: ${0##*/} <Title> <Message>"
echo "Usage: ${0##*/} <Title>"
exit 1
fi