Chinaunix首页 | 论坛 | 博客
  • 博客访问: 390675
  • 博文数量: 107
  • 博客积分: 2536
  • 博客等级: 少校
  • 技术积分: 783
  • 用 户 组: 普通用户
  • 注册时间: 2009-06-14 15:19
文章分类

全部博文(107)

文章存档

2017年(11)

2016年(8)

2015年(14)

2014年(32)

2012年(1)

2011年(1)

2010年(7)

2009年(33)

我的朋友

分类: LINUX

2014-04-17 10:25:21

1. git颜色配置

        今天在ubuntu上面安装了git应用程序。通过ssh登录后,使用git status,git diff,没有颜色显示。全是黑色,这与公司使用时不一样。

使用默认颜色,配置如下:


git config --global color.diff auto

git config --global color.status auto

git config --global color.branch auto


另一种办法

vi ~/.gitconfig

在该文件里添加:

[color]

    ui = auto

保存文件并退出。

source ~/.gitconfig

git log


注意:

如果没有~/.gitconfig文件,说明没有配置gitconfig,需要在命令行下输入如下命令:

  1. Configure your username using the following command:
    git config --global user.name "FIRST_NAME LAST_NAME"

  2. Configure your email address using the following command:
    git config --global user.email ""

2. git默认编辑器设置

git config --global core.editor vim


3. git alias设置

git config --global alias.st status

git config --global alias.co checkout

git config --global alias.ct commit

git config --global alias.df diff

git config --global alias.br branch
阅读(729) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~