-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.bashrc
53 lines (49 loc) · 901 Bytes
/
.bashrc
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
alias k=kubectl
alias gs='git status'
alias gaa='git add .'
gcom() {
git commit -m "$1"
}
gpull() {
git pull origin $1
}
gpush() {
git push origin $1
}
alias aws=aws2
# git add commit push
gacp() {
gs
gaa
gcom "$1"
gpush "$2"
}
# git add commit push set upstream
gacpsu() {
gs
gaa
gcom "$1"
currentBranch=$(git rev-parse --symbolic-full-name --abbrev-ref HEAD)
git push --set-upstream origin $currentBranch
}
kctx() {
export KUBECONFIG="$1"
}
# git checkout existing branch
gch() {
git checkout "$1"
}
# git checkout new branch
gnch() {
git checkout -b "$1"
}
# git clean local unused branches
gclb() {
git branch -r | awk '{print $1}' | egrep -v -f /dev/fd/0 <(git branch -vv | grep origin) | awk '{print $1}' | xargs git branch -D
}
myclone() {
cd ..
git clone "$1"
code $(basename -s .git $(basename "$1"))
cd -
}