配置git 缩写命令

配置git 缩写命令, 修改~目录下.gitconfig文件

[user]
        name = your name
        email = your email
# Please adapt and uncomment the following lines:
#       name = your name
#       email = your email
[alias]
    unstage = reset HEAD --
    br = branch
    co = checkout
    df = diff
    dfc = diff --cached
    st = status
    cl = reset --hard HEAD --
    cp = cherry-pick
    last = log -1 HEAD
    pt = format-patch --stdout HEAD^
    showf = show --name-status
    ci = commit
#graphical log
    glog = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
#short log
    slog = log --pretty=format:'%H - %an, %ar : %s' --name-only
#very short log
    vslog = log --pretty=format:'%H - %s : %an, %ci'
    vslog1 = log -n 10 --pretty=format:'%H - %an, %ar : %s'
    listtags = log --tags --simplify-by-decoration --pretty='format:%H %ai %d %s'
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • git基本操作与规范流程 git是个非常好用的版本工具,不但可以在linux下环境使用,还可以在windows下使...
    goodjcs阅读 2,642评论 0 0
  • 安装: windows安装git-- msysgit是windows版的git,下载单独的.exe按照默认选项安装...
    alceyp阅读 3,980评论 0 0
  • 下面是我整理的常用 Git 命令清单。几个专用名词的译名如下。 Workspace:工作区 Index / Sta...
    晴天4327阅读 1,456评论 1 2
  • git config —global user.name “Nshen” //必须git config —glob...
    困卡阅读 2,900评论 1 9
  • 16宿命:用概率思维提高你的胜算 以前的我是风险厌恶者,不喜欢去冒险,但是人生放弃了冒险,也就放弃了无数的可能。 ...
    yichen大刀阅读 11,284评论 0 4