我刚刚意识到它可能非常方便(例如,如果git commit
git-status
输出一些最新的提交消息而不是仅仅是Your branch is ahead of ...
,则为您的提交提供更好的“上下文感” # On branch master
# Your branch is ahead of 'origin/master' by 2 commits.
#
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
# modified: Gemfile.lock
#
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# models.html
# script/rails_ssl
# spec.txt
这样的事情
# On branch master
# Your branch is ahead of 'origin/master' by 2 commits:
# z1s4c8 Use Rack::SSL to force SSL, make cookies secure
# a5f7qw Fixed department filter
#
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
# modified: Gemfile.lock
#
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# models.html
# script/rails_ssl
# spec.txt
看起来像这样
{{1}}
短的谷歌搜索会议没有发现任何伟大的事情。
答案 0 :(得分:2)
您可以为日志创建别名,例如:
git config --global alias.last 'log --oneline --decorate -n5'
答案 1 :(得分:0)
目前的git没有内置的方法,基于今天对format_tracking_info
的检查(参见remote.c)。
您最好的选择是将功能请求邮件发送至git@vger.kernel.org。