首页 > 其他 > 详细

Git 配置别名

时间:2019-01-20 13:18:40      阅读:132      评论:0      收藏:0      [点我收藏+]

在 svn 中,我们可以使用 svn ci 来提交代码,使用 svn up 来更新代码,这就是别名,相当于 Linux 中的 alias,git 同样也可以设置别名

[root@localhost ~]$ git config --list                       # 查看别名
[root@localhost ~]$ git config --global alias.ci commit     # 设置别名
[root@localhost ~]$ git config --global --unset alias.ci    # 取消别名

常用的别名设置:

[root@localhost ~]$ git config --global alias.ci commit
[root@localhost ~]$ git config --global alias.br branch
[root@localhost ~]$ git config --global alias.up update
[root@localhost ~]$ git config --global alias.co checkout
[root@localhost ~]$ 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 配置别名

原文:https://www.cnblogs.com/pzk7788/p/10294264.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!