1、Git bash命令配置方法
安装gitbash,打开路径文件 D:Program FilesGitetcprofile.daliases.sh ,输入下面的代码,重启gitbash就可以使用快捷命令了
# --show-control-chars: help showing Korean or accented characters alias ls='ls -F --color=auto --show-control-chars' alias ll='ls -l'
alias ga='git add '
alias gd='git diff '
alias gc='git commit'
alias gca='git commit --amend'
alias gs='git status'
alias gl='git log'
alias gb='git branch'
alias gba='git branch -a'
alias gco='git checkout '
alias gp='git pull '
alias gpr='git pull --rebase'
alias gss='git stash save '
alias gsp='git stash pop '
alias gsl='git stash list '
alias gsc='git stash clear '
alias gf='git fetch '
alias gpv='git push '
alias gr='git reset '
alias grh='git reset --soft HEAD~1 '
alias glo='git log --oneline --all --graph --decorate $*'
2、cmder命令配置方法
打开路径文件 D:Program Filescmderconfiguser-aliases.cmd ,输入下面的代码,重启gitbash就可以使用快捷命令了
ga=git add
gd=git diff
gc=git commit
gca=git commit --amend
gs=git status
gl=git log
gb=git branch
gba=git branch -a
gco=git checkout
gp=git pull
gpr=git pull --rebase
gss=git stash save
gsp=git stash pop
gsl=git stash list
gsc=git stash clear
gf=git fetch
gpv=git push
gr=git reset
grh=git reset --soft HEAD~1