# vscode 打开配置文件
code ~/.zshrc
# 举例
alias ccc="clear"
alias desk="cd ~/Desktop"
alias gpdev='git pull origin develop'
alias pcmt='pnpm commit'
alias mintnoii='git config user.name Mintnoii && git config user.email MintnoiiQing@gmail.com && echo "welcome, mintnoii"'
#
source ~/.zshrc
配置 git alias
步骤:
cd ~/.oh-my-zsh/plugins/git
ls
code git.plugin.zsh
// 在配置文件中设置的 alias shell 重启后不会失效~
alias g='git'
alias ga='git add'
alias gaa='git add --all'
alias gapa='git add --patch'
alias gau='git add --update'
alias gav='git add --verbose'
alias gap='git apply'
alias gb='git branch'
alias gba='git branch -a'
alias gbd='git branch -d'
alias gbD='git branch -D'
// 省略...
Bashrc
code ~/.bashrc
alias gpdev='git pull origin develop'
alias set-mintnoii='git config user.name Mintnoii && git config user.email MintnoiiQing@gmail.com && echo "welcome, mintnoii"'
alias ccc='clear'
alias ssh-github='eval `ssh-agent` && ssh-add ~/.ssh/id_rsa_github'