-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.aliases
96 lines (79 loc) · 4.61 KB
/
.aliases
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
alias c="clear"
alias f="nautilus . > /dev/null 2>&1 &"
alias t="tmux"
# Git aliases
alias gi="git init" # create an empty Git repository or reinitialize an existing one
# Staging
alias ga="git add" # stage file(s)
alias gad='git add $(git ls-files --deleted)' # add all deleted files
alias gua="git restore --staged" # unstage file(s)
# Commit
alias Gc="git commit" # open text editor for commit message & commit
alias gcm="git commit --message" # commit message on command & commit
alias gcd="git commit --verbose" # show unified diff between the HEAD commit and what would be committed at the bottom of the commit message
alias gcfast="git commit -a" # stages everything and commit
alias gca="git commit --amend --no-edit" # replace the tip of the current branch by creating a new commit.
alias gitOopsieDaisy="git add -all && git commit --amend --no-edit && git push --force-with-lease"
# Removing, moving and undoing
alias gundo="git checkout --" # discard changes in working directory
alias grm="git rm" # remove files matching pathspec from the index, or from the working tree and the index
alias gmv="git mv" # move or rename a file, directory or symlink
# Status
alias Gs="git status" # status long
alias gss="git status --short" # status short
# Logging
alias gl="git log" # default log
alias gls="git log --stat" # log with a diffstat
alias glp="git log --patch" # log and generate patch
alias glo="git log --pretty=oneline" # logs one commit per line
alias glG="git log --oneline --decorate --graph --all" # logs graph, one commit per line
alias glS="git log -S" # search regex and log
alias glb="git branch -v" # logs last commit in each branch
# Git diff
alias gdiff="git diff" # diff between last commit and unstaged file
alias gdiffs="git diff --staged" # diff between staged file and last commit
# Remotes
alias grlist="git remote -v" # list remotes
alias grd="git push origin --delete" # delete remote branch
alias grs="git remote show" # information about the remote name
alias grr="git remote rename" # rename the remote
alias gclone="git clone" # git clone remote
alias gfetch="git fetch" # git fetch remote (does not merge)
alias gpush="git push" # push to remote
alias gpull="git pull" # pull (fetch and merge)
# Branching
alias gb="git branch" # list branches
alias gbmerged="git branch --merged" # filter the list of branches to branches that you have merged
alias gcout="git checkout" # switch to branch
alias gcb="git checkout -b" # create and checkout branch
alias gm="git merge" # merge branch
alias gbdelete="git branch -d" # delete branch
alias gbdeleteFORCE="git branch -D" # delete branch even if not merged
# Work stuff
alias bbtest="docker exec -it bipa-btc_testnet-1 bitcoin-cli -rpcuser=dev -rpcpassword=dev -rpcport=18332"
alias bbreg="bitcoin-cli -rpcuser=dev -rpcpassword=dev -rpcport=18443"
alias blntest="docker exec -it bipa-lnd-1 lncli --network=testnet --rpcserver lnd:10009 --macaroonpath=/root/.lnd/data/chain/bitcoin/testnet/admin.macaroon"
alias bdb="docker exec -it bipa-database-1 psql postgres://postgres:bipa@localhost/bipa"
# Gh CLI Aliases
alias openpr='gh pr create --assignee "lorenzolfm" --reviewer "lsunsi,nicolasauler,guissalustiano,lochetti,WilliamTakeshi,a-moreira" --title'
alias opensitepr='gh pr create --assignee "lorenzolfm" --reviewer "larissajusten,ericviana" --title'
# Diesel migration
alias dm="diesel migration"
# exa
alias ls='exa --icons'
alias lt='exa --tree --level=2 --long --icons --git'
# cargo helpers
alias crun='cargo run'
alias cclean='cargo clean'
alias ccwa='cargo check --workspace --all-targets'
alias ccb='cargo check --workspace --all-targets && cargo build --workspace --all-targets'
alias call='cargo check --workspace --all-targets && \
cargo build --workspace --all-targets && \
./scripts/test.sh && \
cargo clippy --locked --workspace --all-targets -- -D warnings && \
./scripts/check-allows.sh'
alias setwacom="xsetwacom set 'Wacom Bamboo One S Pen stylus' Rotate half && \
xsetwacom set 'Wacom Bamboo One S Pen stylus' MapToOutput next && \
xsetwacom set 'Wacom Bamboo One S Pen stylus' MapToOutput next"
alias uuid="uuidgen | tr -d '[:space:]' | xclip -selection clipboard"
alias copy="xclip -selection clipboard"