本文介绍了什么是“T”在“git状态”中意味着什么? (它不在手册页中)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

  T /当我输入 git status 时, path / to / file ... 
M / path / to / otherfile ...

T git status 的含义是什么?



我试过 man git-status (我认为它应该在那里,但不是)。
div class =h2_lin>解决方案

它意味着文件的类型改变了。例如,一个符号链接变成了一个常规文件。



据我所知,这只适用于符号链接,子模块和常规文件。 b

编辑

此信息请求了来源。虽然这只是我脑海中的信息,但我可以在互联网上找到它的一些参考资料。最突出的是提及T作为类型变化,D作为删除。

编辑2

正如@PhilipOakley指出的那样, man git-diff-files 实际上的确如此显示此信息。

正如@Mat所指出的,它也在 diff.h ,第289行:

  #define DIFF_STATUS_TYPE_CHANGED'T'

并在 wt-status.c ,第282行:

  case DIFF_STATUS_TYPE_CHANGED:
status_printf_more(s,c,_(typechange:%s),one);
休息;


When I type git status I see:

T /path/to/file...
M /path/to/otherfile...

What exactly does the T git status mean?

I tried man git-status (I think it should be there, but isn't).

解决方案

It means that the type of a file changed. For example, a symbolic link that became a regular file.

As far as I know, this only applies to symlinks, submodules and regular files

Edit
A source was requested for this information. While this is simply information that's in my head, I was able to find a few references to it on the internet. The most prominent one was a git changelog mentioning "T" as a type change and "D" as a deletion.

Edit 2
As pointed out by @PhilipOakley, man git-diff-files actually does show this information.

As pointed out by @Mat, it's also in diff.h, line 289:

#define DIFF_STATUS_TYPE_CHANGED    'T'

And in wt-status.c, line 282:

case DIFF_STATUS_TYPE_CHANGED:
    status_printf_more(s, c, _("typechange: %s"), one);
    break;

这篇关于什么是“T”在“git状态”中意味着什么? (它不在手册页中)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

05-28 03:29