-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgh.sh
executable file
·74 lines (73 loc) · 1.51 KB
/
gh.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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#!/bin/bash
clone() {
echo "";
echo -e "${BLUE}git clone https://github.com/$1 ${NC}";
echo "";
git clone https://github.com/$1 && echo "" && l;
echo "";
}
# usage: gh remote <user>/<repo>
remote() {
echo "";
echo -e "${BLUE}git remote add origin https://github.com/$1 ${NC}";
echo "";
git remote add origin https://github.com/$1 && echo "Linked to http://github.com/$1" && echo "";
}
#
add() {
echo "";
echo -e "${BLUE}git add . -v ${NC}";
echo "";
git add .;
}
commit() {
echo "";
echo -e "${BLUE}git commit -m \"$1\"${NC}";
echo "";
git add . && git commit -m "$1";
echo "";
}
ac() {
echo "";
echo -e "${BLUE}git add . -v ${NC}";
echo "";
git add . -v;
echo "";
echo -e "${BLUE}git commit -m \"$1\"${NC}";
echo "";
git commit -m "$1";
echo "";
}
push() {
echo "";
echo -e "${BLUE}git push -u origin $(branch)";
echo "";
git push -u origin $(branch);
echo "";
}
acp() {
echo "";
echo -e "${BLUE}git add . -v ${NC}";
echo "";
git add . -v;
echo "";
echo -e "${BLUE}git commit -m \"$1\"${NC}";
echo "";
git commit -m "$1";
echo "";
echo -e "${BLUE}git push -u origin $(branch)";
echo "";
git push -u origin $(branch);
}
twig() { # create shortcuts for long branch names
echo "";
a $1 'git checkout '$(branch);
var $1 $(branch);
echo "";
echo "run $1 to checkout $(branch)";
echo "";
}
key() {
xclip -sel c < ~/.gh;
echo "🗝️";
}