2021-04-06 11:38:02 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
2021-04-09 10:59:52 +02:00
|
|
|
##################################################
|
|
|
|
# #
|
|
|
|
# AN NOTE ON ADDING ALIASES INTO HERE: #
|
|
|
|
# #
|
|
|
|
##################################################
|
|
|
|
# #
|
|
|
|
# I don't like to implement every single #
|
|
|
|
# shortcuts as an script in the .dotfiles/bin #
|
|
|
|
# directory, bacause it mostly consume my time on#
|
|
|
|
# testing and formatting shit. #
|
|
|
|
# #
|
|
|
|
# So for people who forked my dotfiles repo, I #
|
|
|
|
# recommend to only create an alias on simple #
|
|
|
|
# commands or as an shortcut to scripts provided #
|
|
|
|
# in .dotfiles/bin or ~/.toolkit-mgr-bin. Also #
|
|
|
|
# when adding aliases, make sure the real command#
|
|
|
|
# is an one-liner. For those who want to go on an#
|
|
|
|
# multi-line chaos, good luck to y'all. #
|
|
|
|
# #
|
|
|
|
# For noobs/newbies, the syntax is: #
|
|
|
|
# alias here-owo="real-stuff --goes here" #
|
|
|
|
# #
|
|
|
|
##################################################
|
|
|
|
|
|
|
|
# basic git commands
|
|
|
|
alias stats="git status"
|
|
|
|
## shortcuts to creating commits
|
2021-04-06 11:38:02 +02:00
|
|
|
alias commit="git commit --signoff --gpg-sign"
|
2021-04-09 10:59:52 +02:00
|
|
|
alias commit-nogpg="git commit --signoff --no-gpg-sign"
|
|
|
|
alias new-checkpoint="commit"
|
|
|
|
alias new-checkpoint-nogpg="commit-nogpg"
|
|
|
|
## shortcuts to creating tags
|
|
|
|
alias tag-checkpoint="git tag --gpg-sign"
|
|
|
|
alias tag-checkpoint-nogpg="git tag --no-gpg-sign"
|
|
|
|
alias new-tag="tag-checkpoint"
|
|
|
|
alias new-tag-nogpg="tag-checkpoint-nogpg"
|
|
|
|
## shortcuts to managing yiff stash
|
|
|
|
alias stash="git stash push --keep-index"
|
|
|
|
alias pop-stash="git stash pop"
|
|
|
|
alias apply-stash="git stash apply"
|
|
|
|
alias yeet-stash="git stash drop"
|
|
|
|
## staging stuff
|
|
|
|
alias stage="git add"
|
|
|
|
alias unstage="git rm --cached"
|
2021-04-10 11:51:03 +02:00
|
|
|
alias nuke-from-index="git rm"
|
2021-04-09 10:59:52 +02:00
|
|
|
|
|
|
|
# branch management
|
2021-04-06 11:38:02 +02:00
|
|
|
alias rename-branch="git branch -m"
|
2021-04-09 10:59:52 +02:00
|
|
|
alias set-upstream-remote="git branch -u"
|
2021-04-06 11:38:02 +02:00
|
|
|
|
|
|
|
# remote management
|
|
|
|
alias change-origin="git remote set-url origin"
|
|
|
|
alias change-upstream="git remote set-url upstream"
|
|
|
|
alias add-remote="git remote add"
|
|
|
|
alias change-remote-url="git remote set-url"
|
|
|
|
alias nuke-remote="git remote remove"
|
|
|
|
alias remove-remote="nuke-remote"
|
|
|
|
|
|
|
|
# git push
|
|
|
|
alias push="git push"
|
|
|
|
## add main:master since Git assumes local branch to
|
|
|
|
## remote branch when running this alias
|
|
|
|
alias deploy-divio="git push divio"
|
|
|
|
|
|
|
|
# fetch / pull
|
|
|
|
alias fetch="git fetch --all"
|
|
|
|
## depending on remote branch at upstream,
|
|
|
|
## assumes its same branch.
|
|
|
|
alias pull-upstream="fetch && git pull upstream"
|
|
|
|
alias pull-origin="fetch && git pull origin"
|
2021-04-09 10:59:52 +02:00
|
|
|
|
|
|
|
# history-cleanup like scripts
|
2021-04-10 11:51:03 +02:00
|
|
|
alias clean-shellhis="history -c && clear"
|
2021-04-09 10:59:52 +02:00
|
|
|
|
|
|
|
# test SSH connections
|
|
|
|
alias test-gh-ssh="ssh -p 22 git@github.com"
|
|
|
|
alias test-gl-ssh="ssh -p 22 git@gitlab.com"
|
|
|
|
|
|
|
|
# ssh-agent stuff
|
2021-04-10 11:51:03 +02:00
|
|
|
## quock shortcut into add-ssh-keys stuff
|
2021-04-09 10:59:52 +02:00
|
|
|
alias add-ssh-key="$HOME/.dotfiles/bin/add-ssh-keys"
|
|
|
|
|
2021-04-10 11:51:03 +02:00
|
|
|
# shortcuts to some functions
|
|
|
|
alias edit-script="edit-script-file"
|