Skip to content

Instantly share code, notes, and snippets.

@brunobiondi
Last active February 3, 2024 19:56
Show Gist options
  • Save brunobiondi/00cb62bcc4eb0c76a6f5574ff198e5bf to your computer and use it in GitHub Desktop.
Save brunobiondi/00cb62bcc4eb0c76a6f5574ff198e5bf to your computer and use it in GitHub Desktop.
Linux alias commands

Using ~/.bashrc

alias ll='ls -alF'
alias rebash='source ~/.bashrc'

alias dotenvpull='npx dotenv-vault@latest pull'
alias dotenvpush='npx dotenv-vault@latest push'
alias ncu='npx npm-check-updates -u -i --format group && npm i && npx npm-check-updates -g'

alias dockerstop='docker stop $(docker ps -q)'

gitnah () {
    git reset --hard
    git clean -df
    if [ -d ".git/rebase-apply" ] || [ -d ".git/rebase-merge" ]; then
        git rebase --abort
    fi
}

mcd() {
    mkdir -p "$1" && cd "$1"
}

Using ~/.zshrc

alias ll='ls -alF'
alias rebash='source ~/.zshrc'

alias dotenvpull='npx dotenv-vault@latest pull'
alias dotenvpush='npx dotenv-vault@latest push'
alias ncu='npx npm-check-updates -u -i --format group && npm i && npx npm-check-updates -g'

alias dockerstop='docker stop $(docker ps -q)'

gitnah () {
    git reset --hard
    git clean -df
    if [ -d ".git/rebase-apply" ] || [ -d ".git/rebase-merge" ]; then
        git rebase --abort
    fi
}

mcd() {
    mkdir -p "$1" && cd "$1"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment