git global

    git config --global user.name "wang.zj"
    git config --global user.email "[email protected]"
    git config --global color.ui true            # 让Git显示颜色,会让命令输出看起来更醒目
    git config format.pretty oneline           # 显示历史记录时,只显示一行注释信息
    git config --global alias.st status         # 配置别名
    git config --global alias.co checkout    # co表示checkout
    git config --global alias.ci commit        # ci表示commit
    git config --global alias.br branch        # br表示branch
    git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"
    git config --list                        # 查看当前配置

猜你喜欢

转载自blog.csdn.net/xiaozhiwise/article/details/114262412