Skip to content

Instantly share code, notes, and snippets.

@fullmetalbrackets
Last active January 17, 2022 05:31
Show Gist options
  • Save fullmetalbrackets/e760f26d95c980e152677b01fa9afa2b to your computer and use it in GitHub Desktop.
Save fullmetalbrackets/e760f26d95c980e152677b01fa9afa2b to your computer and use it in GitHub Desktop.
Linux Aliases
# Place the '.aliases' in ~/ home directory
## If using zsh add the following to '.zshrc' file:
### source $HOME/.aliases
alias up='sudo apt update && sudo apt full-upgrade -y'
alias si='sudo apt install -y'
alias sn='sudo nano'
alias rb='sudo reboot'
alias sd='sudo shutdown'
alias sr='sudo rm'
alias srr='sudo rm -rf'
alias s='sudo'
alias n='nano'
alias c='code'
alias v='vim'
alias x='clear'
alias q='exit'
alias g='grep'
alias speed='speedtest'
alias os='neofetch'
alias hs='history | grep'
alias ap='ansible-playbook'
alias dc='docker-compose up -d'
alias myip='curl http://ipecho.net/plain; echo'
# git
alias g='git'
alias pull='git pull'
alias fetch='git fetch'
alias status='git status'
alias main='git switch main'
alias gbm='git branch -M main'
alias ga='git add.'
alias gc='git commit -m'
alias gac='git add . && git commit -m'
alias gi='git init'
alias gp='git push'
alias gr='git rm'
alias gf='git fetch'
alias gm='git merge'
alias gs='git status --short'
alias gd='git diff'
alias gdis='git discard'
alias gs='git switch -c'
alias gcl='git clone'
alias gch='git checkout'
alias gbr='git branch'
alias gbd='git branch -D'
function gc() {
args=$@
git commit -m "$args"
}
function gca() {
args=$@
git commit --amend -m "$args"
}
function gcp() {
title="$@"
git commit -am $title && git push -u origin
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment