-
Notifications
You must be signed in to change notification settings - Fork 0
/
aliases.zsh
executable file
·37 lines (34 loc) · 965 Bytes
/
aliases.zsh
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
#!/bin/sh
if which hub >/dev/null 2>&1; then
alias git='hub'
fi
alias gl='git pull --prune'
alias glg="git log --graph --decorate --oneline --abbrev-commit"
alias glga="glg --all"
alias gp='git push origin HEAD'
alias gm='git push origin master'
alias gpa='git push origin --all'
alias gd='git diff'
alias gc='git commit'
alias gca='gc -a'
alias gco='git checkout'
alias gcb='git checkout -b'
alias gb='git branch -v'
alias ga='git add'
alias gaa='git add -A'
alias gcm='gc -m'
alias gcam='git commit -a -m'
alias gst='git status -sb'
alias gbd='git branch -D'
alias gpom='git pull origin main'
alias gpo='git pull origin'
alias gpr='gp && git pr'
alias glnext='git log --oneline $(git describe --tags --abbrev=0 @^)..@'
alias grebase='git pull origin main && git push origin'
if which svu >/dev/null 2>&1; then
alias gtpatch='echo `svu p`; git tag `svu p`'
alias gtminor='echo `svu m`; git tag `svu m`'
fi
gi() {
curl -s "https://www.gitignore.io/api/$*"
}