美文网首页
git config

git config

作者: andforce | 来源:发表于2017-07-17 10:53 被阅读24次

    配置git,把下面脚本保存到~/.gitconfig即可.

    [core]
        autocrlf = false
        excludesfile=~/.gitignore
        editor = vim
    [user]
    [merge]
        summary = true
        tool = meld
    [diff]
        renames = copy
        tool = meld
        wordregex = "[[:alnum:]_]+|[^[:space:]]"
        external = /bin/git-meld.sh
    [i18n]
        logoutputencoding = UTF-8
    [color]
        diff = auto
        status = true
        branch = auto
        interactive = auto;
        ui = auto;
    [showbranch]
        default = --topo-order
        default = heads/*
    [status]
        submodulesummary = -1
    [format]
        numbered = auto
    [push]
        default = tracking
    
    [alias]
        sed = !git ls-files --stage | grep ^100 | awk '{print $4}' | xargs sed -r -s
        slg = shortlog --pretty='format:%h %s'
        locate = !sh -c 'git ls-files | grep --color=auto "$1"' -
        co=checkout
            ci=commit -s -a
            br=branch
            st=status
            cp=cherry-pick
            cr=cherry
            rb=rebase
            fp=format-patch
            hist=log --pretty=format:\"%Cred%h %Cblue%ad %Cred| %Creset%s%d %Cgreen[%an]\" --graph --date=short
            flog=log --pretty=fuller --graph    
    

    相关文章

      网友评论

          本文标题:git config

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