gpt4 book ai didi

git - 描述 Git 符号

转载 作者:太空狗 更新时间:2023-10-29 13:20:59 24 4
gpt4 key购买 nike

我已经开始使用 Git,因为我认为它是一个更好的修订 Controller 。

谁能帮我理解 git status -s 符号的含义?

最佳答案

如果你写

git help status 

终端中会出现 OPTIONS 列表,告诉你 -s 指的是 git status 的短格式。

如果您转到OUTPUT->Short Format,您会发现所有符号均已解释:

   Short Format
In the short-format, the status of each path is shown as

XY PATH1 -> PATH2

where PATH1 is the path in the HEAD, and the " -> PATH2" part is shown
only when PATH1 corresponds to a different path in the index/worktree
(i.e. the file is renamed). The XY is a two-letter status code.

The fields (including the ->) are separated from each other by a single
space. If a filename contains whitespace or other nonprintable
characters, that field will be quoted in the manner of a C string
literal: surrounded by ASCII double quote (34) characters, and with
interior special characters backslash-escaped.

For paths with merge conflicts, X and Y show the modification states of
each side of the merge. For paths that do not have merge conflicts, X
shows the status of the index, and Y shows the status of the work tree.
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

Ignored files are not listed, unless --ignored option is in effect, in
which case XY are !!.

X Y Meaning
-------------------------------------------------
[MD] not updated
M [ MD] updated in index
A [ MD] added to index
D [ M] deleted from index
R [ MD] renamed in index
C [ MD] copied in index
[MARC] index and work tree matches
[ MARC] M work tree changed since index
[ MARC] D deleted in work tree
-------------------------------------------------

D D unmerged, both deleted
A U unmerged, added by us
U D unmerged, deleted by them
U A unmerged, added by them
D U unmerged, deleted by us
A A unmerged, both added
U U unmerged, both modified
-------------------------------------------------
? ? untracked
! ! ignored
-------------------------------------------------

关于git - 描述 Git 符号,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20245440/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com