Git在什么版本的git状态中获得了-branch选项? [英] In what version of Git did git-status get the --branch option?
问题描述
在最新版本的git中,您可以使用flag -branch(或-b)来即使以短格式显示分支和跟踪信息。
In the latest version of git you can use the flag --branch (or -b) to "Show the branch and tracking info even in short-format."
当(哪个版本)git介绍此选项时?我知道至少在1.7.0.4它不是一个选项。
When (which version) did git introduce this option? I know that at least in 1.7.0.4 it isn't an option.
推荐答案
git grep -F
和 git log --oneline -S
通常是从Git回购挖掘任何东西的有力方法:
( manojlds 在他的回答一个一线,如果你搜索正确的话,大多数时候应该工作评论像OP的问题,Go upvote它)。
The combination of git grep -F
and git log --oneline -S
is generally a powerful way to dig anything out of a Git repo:
(manojlds proposes in his answer a one-liner which should work most of the time if you search for the right comment like the OP's question does. Go upvote it).
VonC@NETVONC ~/Prog/git/git (master)
$ git grep -F 'Show the branch'
Documentation/git-status.txt: Show the branch and tracking info even in short-format.
VonC@NETVONC ~/Prog/git/git (master)
$ git log --oneline --follow -S'Show the branch' -- Documentation/git-status.txt
46077fa Documentation+t5708: document and test status -s -b
VonC@NETVONC ~/Prog/git/git (master)
$ git tag --contains 46077fa
ko-maint
ko-master
ko-next
ko-pu
v1.7.2
所以1.7.2
(我总是发现这个线程一个简单的git挖掘插图)
(I always found this thread a neat illustration of git digging)
注意:根据 git描述
已经在1.7.1之后引入了233个提交:
Note: It has been introduced 233 commits after 1.7.1 according to git describe
:
VonC@NETVONC ~/Prog/git/git (master)
$ git describe 46077fa
v1.7.1-233-g46077fa
它是在5月25日星期二首次推出16:52:03 2010 +0200
It was first introduced at Tue May 25 16:52:03 2010 +0200
VonC@NETVONC ~/Prog/git/git (master)
$ git show 46077fa
commit 46077fa5d477a3e96e0bb96042a2a9fdc9c818cb
Author: Michael J Gruber <git@drmicha.warpmail.net>
Date: Tue May 25 16:52:03 2010 +0200
Documentation+t5708: document and test status -s -b
Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
这篇关于Git在什么版本的git状态中获得了-branch选项?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!