zoukankan      html  css  js  c++  java
  • git log的个性化设置

    --date=(relative|local|default|iso|rfc|short|raw)
      Only takes effect for dates shown in human-readable format,
      such as when using "--pretty".  log.date config variable
      sets a default value for log command’s --date option.
    --date=relative shows dates relative to the current time, e.g. "2 hours ago".
    --date=local shows timestamps in user’s local timezone.
    --date=iso (or --date=iso8601) shows timestamps in ISO 8601 format.
    --date=rfc (or --date=rfc2822) shows timestamps in RFC 2822 format,
      often found in E-mail messages.
    --date=short shows only date but not time, in YYYY-MM-DD format.
    --date=raw shows the date in the internal raw git format %s %z format.
    --date=default shows timestamps in the original timezone
      (either committer’s or author’s).

    .gitconfig中天上下面这样, 就很好了

    git config --global pretty=xxxxx

    git config --global log.date=xxxxx

    [format]
        pretty = "  %Cred%h %Cgreen(%ad) %C(bold blue)<%an> %Creset%d  %s "
    [log]
        date = iso8601

    达到的效果就是:

    git log --pretty=format:'  %Cred%h %Cgreen(%ad) %C(bold blue)<%an> %Creset%d  %s ' --date=format:'%Y-%m-%d %H:%M:%S' -n 100

    的效果.

    设置了全局之后, git log就按照上面的好看的格式出来了.

  • 相关阅读:
    异常:java.io.IOException: Too many open files:
    转载 Servlet3.0中使用注解配置Servle
    Spring 源码从github导入源码到idea2016
    git 命令
    常用linux命令
    mysql优化常用语句
    mysql中in、not in、exists和not exists的区别
    mysql优化
    php常用的数据结构算法
    算法(一)
  • 原文地址:https://www.cnblogs.com/tekikesyo/p/10951521.html
Copyright © 2011-2022 走看看