美文网首页
git配置 alias

git配置 alias

作者: 记忆是条狗 | 来源:发表于2020-04-17 15:22 被阅读0次

    命令行设置git的配置 alias

    git config --global alias.st status #代表输入git st就代表git status
    

    配置 ~/.gitconfig 文件

            pl = pull
            st = status
            ci = commit
            co = checkout
            br = branch
            df = diff
            unstage = reset HEAD --
            lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Cres    et' --abbrev-commit
            last = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Cr    eset' --abbrev-commit -1 HEAD
      [core]
        excludesfile = /Users/mac/.gitignore_global
        editor = /usr/local/bin/vim
      [push]
            default = simple
      [difftool "sourcetree"]
        cmd = opendiff \"$LOCAL\" \"$REMOTE\"
        path =
      [mergetool "sourcetree"]
        cmd = /Applications/Sourcetree.app/Contents/Resources/opendiff-w.sh \"$LOCAL\" \"$REMOTE\" -ancestor \"$BASE\" -merge \"$MERGED\"
        trustExitCode = true
    

    相关文章

      网友评论

          本文标题:git配置 alias

          本文链接:https://www.haomeiwen.com/subject/nckyvhtx.html