-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathcommitandpush.sh
More file actions
executable file
·25 lines (18 loc) · 712 Bytes
/
commitandpush.sh
File metadata and controls
executable file
·25 lines (18 loc) · 712 Bytes
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
# A shell script for easier commit operations and pushing to remote repositories
# made by theroyakash
banner()
{
echo "+------------------------------------------+"
printf "| %-40s |\n" "`date`"
printf "| %-40s |\n" "Made by theroyakash"
echo "| |"
printf "|`tput bold` %-40s `tput sgr0`|\n" "$@"
echo "+------------------------------------------+"
}
banner "Starting the Commit Job"
read -p "Commit Message: " cmessage
read -p "Add a description: " desc
read -p "Continue commiting $cmessage? (Y/N): " confirm && [[ $confirm == [yY] || $confirm == [yY][eE][sS] ]] || exit 1
git add -A # Add all the files
git commit -m "$cmessage" -m "$desc"
git push