-
Notifications
You must be signed in to change notification settings - Fork 0
/
bashrc
70 lines (49 loc) · 1.49 KB
/
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
eval "$(starship init bash)"
alias ll="exa -l -g --icons"
alias llt="exa -1 --icons --tree"
alias lla="exa -l -g --icons --all"
alias vim="nvim"
# Git config
alias gs='git status -sb'
alias ga='git add .'
alias gap='ga -p'
alias gbr='git branch -v'
gc() {
git diff --cached | grep '\btap[ph]\b' >/dev/null &&
echo "\e[0;31;29mOops, there's a #tapp or similar in that diff.\e[0m" ||
git commit -v "$@"
}
alias gch='git cherry-pick'
alias gca='git commit -am'
# alias gcm='git commit -v --amend'
alias gcm='gca'
alias gco='git checkout'
alias gcob='git checkout -b'
alias gd='git diff -M'
alias gd.='git diff -M --color-words="."'
alias gdc='git diff --cached -M'
alias gdc.='git diff --cached -M --color-words="."'
alias gf='git fetch'
# Helper function.
git_current_branch() {
cat "$(git rev-parse --git-dir 2>/dev/null)/HEAD" | sed -e 's/^.*refs\/heads\///'
}
alias glog='git log --date-order --pretty="format:%C(yellow)%h%Cblue%d%Creset %s %C(white) %an, %ar%Creset"'
alias gl='glog --graph'
alias gla='gl --all'
alias gm='git merge --no-ff'
alias gmf='git merge --ff-only'
alias gps='git push'
alias gpthis='gps origin -u $(git_current_branch)'
alias grb='git rebase -p'
alias grba='git rebase --abort'
alias grbc='git rebase --continue'
alias grbi='git rebase -i'
alias gr='git reset'
alias grh='git reset --hard HEAD'
alias grsh='git reset --soft HEAD~'
alias grv='git remote -v'
alias gst='git stash'
alias gstp='git stash pop'
alias gup='git pull'
export PATH=$PATH:/home/gitpod/.local/bin