git config

配置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环境时候,首先在 git config 中需要声明 user.name 和 user.email,因...
    Midorra阅读 6,670评论 0 4
  • 良好的配置有助于提高效率,减少不必要的错误。把运行配置的相关内容单拎出来放到这里,查找和更新方便。 Customi...
    michael_jia阅读 20,847评论 1 10
  • 听说纽约正是大雪纷飞, 应该还能赶上从成田机场往那里的班次; 再跟当地的朋友一个一个地探问可供借住的地方, 不管怎...
    几根胸毛阅读 259评论 0 0
  • 《疯传》读后感 通常我们会认为,产品的质量,价格以及广告,对产品的推广非常重要,但事实上,社会的影响是靠人们口头传...
    细雪飘阅读 501评论 0 1
  • 1学霸的出现 之所以要提起周悦悦,是她在我的生命里印的太深刻了。我从来没有佩服一个人到这种程度,而她却真真切切近距...
    叫我可清阅读 1,900评论 2 4