首页 > 其他 > 详细

git别名

时间:2018-03-24 15:19:27      阅读:195      评论:0      收藏:0      [点我收藏+]
git别名

创建别名

[root@localhost apeng]# git config --global alias.ci commit
[root@localhost apeng]# git config --global alias.fz branch
[root@localhost apeng]# git config --global alias.sw checkout

查看别名

[root@localhost apeng]# git config --list |grep alias
alias.ci=commit
alias.fz=branch
alias.sw=checkout

将别名加入到这个文件中/root/.gitconfig

[root@localhost apeng]# vim /root/.gitconfig
[user]
        name = apeng
        email = apeng@apenglinux.com
[alias]
        ci = commit
        fz = branch
        sw = checkout

给日志作一个别名

[root@localhost apeng]# 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别名

原文:http://blog.51cto.com/13480443/2090639

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