对于git diff --name-status,输出是什么意思? [英] For git diff --name-status, what does the output mean?

查看:324
本文介绍了对于git diff --name-status,输出是什么意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我跑步时 git diff --name-status 我看到这样的行:

when i run git diff --name-status I am seeing lines like this:

MM  mm/Jenkinsfile

"MM"是什么意思?

mkreiger1的可能重复项"确实提供了有用的信息,但是像Koop4的答案一样,它无需引用git文档来回答特定问题即可告知.

mkreiger1's 'possible duplicate' does provide useful information but like Koop4's answer it informs without citing a git document that answers this specific question.

在哪里具体描述了多个字母(例如"M")?可能的重复项"描述了为什么(并感谢您),但是在哪里记录了此文件?

Where are multiple letters (like 'M') specifically described? The 'possible duplicate' describes why (and thanks for that) but where is this documented?

推荐答案

作为文档解释说,该选项

仅显示更改文件的名称和状态.

Show only names and status of changed files.

短格式是由路径引起的两个字母的状态代码:

The short-format is a two-letter status code follewed by a path:

XY路径

  • 对于具有合并冲突的路径,X和Y显示合并每一侧的修改状态.

  • For paths with merge conflicts, X and Y show the modification states of each side of the merge.

对于没有合并冲突的路径,X显示索引的状态,而Y显示工作树的状态.

For paths that do not have merge conflicts, X shows the status of the index, and Y shows the status of the work tree.

对于未跟踪的路径,XY为??.

For untracked paths, XY are ??.

其他状态代码可以解释如下:

Other status codes can be interpreted as follows:

' ' = unmodified
M = modified
A = added
D = deleted
R = renamed
C = copied
U = updated but unmerged

您可以在相关部分中详细了解短格式状态

You can read more about the short format status in the related section.

这篇关于对于git diff --name-status,输出是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆