DEV Community

Discussion on: What are your preferred bash aliases?

Collapse
 
mishal23 profile image
Mishal Shah • Edited

I've noted down all the aliases I use here: link

My favorite ones are:

function lazygit() {
   local message="$1"
   local push_branch="${2:-$(git rev-parse --abbrev-ref HEAD)}"
   echo "Commit Message: $message"
   echo "Push Branch: ${push_branch}"
   git add --all
   git commit -m "$message"
   git push origin "$push_branch"
}

alias lazygit=lazygit

alias fullupdateandclean='sudo apt-get update && sudo apt-get upgrade && sudo apt-get dist-upgrade && sudo apt autoclean && sudo apt autoremove'
Collapse
 
nocnica profile image
Nočnica Mellifera

really like 'lazygit' I may steal that one :)

Collapse
 
mishal23 profile image
Mishal Shah

Sure :D