Skip to content

Instantly share code, notes, and snippets.

@shangdev
Last active April 15, 2019 07:08
Show Gist options
  • Save shangdev/cad1453fa8d96f1f6af75d4e18a0516d to your computer and use it in GitHub Desktop.
Save shangdev/cad1453fa8d96f1f6af75d4e18a0516d to your computer and use it in GitHub Desktop.
Git alias for bashrc or zshrc
# rc 表示 run command (运行命令)
# for zsh
$ vi ~/.zshrc
# for bash
$ vi ~/.bashrc
alias gs="git status"
alias gc="git commit -m "
alias gaa="git add ."
alias gp="git push"
alias gl="git log --graph"
alias gll="git log --graph --abbrev-commit --decorate --all --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(dim white) - %an%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n %C(white)%s%C(reset)'"
# 应用
source ./.bashrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment