bashrc: Update Termux stuff + create aliases

Signed-off-by: Andrei Jiroh Eugenio Halili <andreijiroh@madebythepins.tk>
This commit is contained in:
Andrei Jiroh Eugenio Halili 2021-04-06 17:38:02 +08:00
parent 4e53caf81f
commit 85e54ac8bd
Signed by: ajhalili2006
GPG Key ID: A30EBE40AD856D88
2 changed files with 32 additions and 4 deletions

28
bashrc/aliases Normal file
View File

@ -0,0 +1,28 @@
#!/bin/bash
# shortcuts to Git
alias commit="git commit --signoff --gpg-sign"
alias tag="git tag --gpg-sign"
alias rename-branch="git branch -m"
# remote management
alias change-origin="git remote set-url origin"
alias change-upstream="git remote set-url upstream"
alias set-upstream-remote="git branch -u"
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"

View File

@ -16,13 +16,13 @@ else
source ~/.dotfiles/bin/source-ssh-agent
fi
# Run this with add-ssh-keys instead
#ssh-add $HOME/.ssh/github-personal
# Then add my scripts
export DOTFILES_STUFF_BIN="$HOME/.dotfiles/bin"
export PATH=$PATH:$DOTFILES_STUFF_BIN
# clean up bash history
echo
rm .bash_history && echo "Shell history cleaned for past session"
history -c && echo "history-cleanup: Shell history cleaned for past session" || echo "history-cleanup: No bash_history file found for past session."
# add my aliases
source ~/.dotfiles/bashrc/aliases