-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgtt
More file actions
executable file
·46 lines (46 loc) · 1.16 KB
/
gtt
File metadata and controls
executable file
·46 lines (46 loc) · 1.16 KB
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/bin/bash
while [ $# -gt 0 ]; do
case $1 in
-a|a)
shift
git add "$1"
shift
;;
-A|A)
git add -A
shift
;;
-cm|cm)
shift
git commit -m "$1"
shift
;;
-s|s)
git status
shift
;;
-p|p)
shift
git push "$@"
exit 0
;;
-d|d)
shift
git diff "$1"
exit 0
;;
--help|-h)
script_name=${0##*/}
printf "%s\n\n" "$script_name - git commands tools"
printf "%s\n" "Options:"
printf "\t%s\n" "-a add a new file"
printf "\t%s\n" "-A add all changed files"
printf "\t%s\n" "-cm commits with message"
printf "\t%s\n" "-s shows the current status"
printf "\t%s\n" "-p pushes all changes to github"
printf "\t%s\n" "-d show file differences"
printf "\t%s\n" "--help show this help page"
exit 0
;;
esac
done