-
Notifications
You must be signed in to change notification settings - Fork 0
/
aliases.sh
34 lines (29 loc) · 868 Bytes
/
aliases.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
alias python=python3
# Open zshrc in VS Code
alias edit="code ~/.zshrc"
# Kill server running on the port given
kill_port() {
sudo lsof -t -i tcp:"$1" | xargs kill
}
function altamiga() {
cd ~/code/altamiga/frontend &&
parallel -j 2 -u ::: 'pnpm start --host 0.0.0.0' 'cd ../api && .venv/bin/python manage.py runserver'
}
function seed() {
cd ~/code/altamiga/api &&
.venv/bin/python manage.py seed $@ &&
cd ../frontend
}
# Git
alias gst="git status"
alias gco="git checkout"
alias gcm="git checkout main"
alias log="git log --oneline --decorate --color"
alias commit="git add . && git commit -m"
alias pull="git pull"
alias push="git push"
alias force="git push --force"
alias pop="git stash pop"
alias stash="git stash -u"
alias sweep='git branch | grep -v "$(git branch --show-current)" | xargs git branch -d'
alias reset="git reset --soft HEAD^"