DEV Community

Discussion on: Aliases: Making the command line your friend

Collapse
 
zakmiller profile image
Zak Miller

What I use for git:

alias gs "git status"
alias ga "git add"
alias gc "git commit"
alias gp "git push"
alias gpl "git pull"
alias gch "git checkout"
alias gt "git add -u && git commit --amend --no-edit && git push -f"
alias gl "git log"

For hugo:

alias hs "hugo server --disableFastRender --watch -v"

To generate a UUID (universally unique identifier) quickly:

alias uuid="python -c 'import sys,uuid; sys.stdout.write(uuid.uuid4().hex)' | pbcopy && pbpaste && echo"

To do an ls every time I do a cd:

function cd
    if count $argv > /dev/null
        builtin cd "$argv"; and ls
    else
        builtin cd ~; and ls
    end
end