text Git别名,用于显示插入和删除的总数。

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了text Git别名,用于显示插入和删除的总数。相关的知识,希望对你有一定的参考价值。

# Usage: git total [OPTION...]
#
# Options:
#
#   In theory, the command accepts all command line options supported by
#   the "git log" command. In reality, however, only few commit-limiting
#   options are useful. This includes:
#
#   --author=PATTERN, --committer=PATTERN
#       Displays the number of lines changed by a certain author.
#
#   --since=DATE, --after=DATE
#       Counts only commits that are more recent than a specific date.
#
#   --until=DATE, --before=DATE
#       Counts only commits that are older than a specific date.
#
#   -n NUMBER, --max-count=NUMBER
#       Counts only a certain number of commits.
#
# Examples:
#
#   git total
#       Displays the total number of changes.
#
#   git total --author=john@example.com
#       Displays the total number of changes by john@example.com.

[alias]
	total = "!f() { git log $@ --numstat | perl -ne '$i+=$1 and $d+=$2 if /^(\\d+)\\s+(\\d+)/; END { print \"$i insertion(s), $d deletion(s)\n\"}'; }; f"

以上是关于text Git别名,用于显示插入和删除的总数。的主要内容,如果未能解决你的问题,请参考以下文章

text 常用git命令的别名

text 有用的git别名

text git cli的别名图:]

Git - 删除或编辑别名

使用 git stats 显示添加、修改和删除的行数

text Git别名