需要帮助理解 Eclipse 中的 Git 图标

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/15556550/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 08:21:00  来源:igfitidea点击:

Need help understanding the Git icons in Eclipse

eclipsegit

提问by Michael Goldsman

I'm trying to work through getting my project to commit - but I'm getting errors.

我正在努力让我的项目提交 - 但我遇到了错误。

I'm looking at the synchronization perspective and do not understand what all of the file icons mean. Can someone give me a good reference to tell me what each of the icons mean?

我正在查看同步角度,但不明白所有文件图标的含义。有人可以给我一个很好的参考来告诉我每个图标的含义吗?

Such as:

如:

  • Blue arrow pointing to the left
  • Double-red arrow
  • White X on red square
  • White + over double red arrow
  • Blue arrow pointing to the left with a white dash on it
  • Exclamation point
  • Gray arrow pointing to the right
  • Gray arrow pointing to the right with white + sign
  • Gray box with white asterisk on it.
  • 指向左边的蓝色箭头
  • 双红箭头
  • 红场上的白色 X
  • 白色 + 上双红色箭头
  • 指向左边的蓝色箭头,上面有一个白色的破折号
  • 感叹号
  • 指向右侧的灰色箭头
  • 指向右侧的灰色箭头,带有白色 + 符号
  • 带有白色星号的灰色框。

回答by VonC

You can find a good description in the "Synchronize View" sectionof the Egit manual:

您可以在Egit 手册“同步视图”部分找到一个很好的描述:

Synch view

同步视图

This state is shown by using icons and can also be configured to show the state as text appended to the resource name.

  • dAn incoming addition means that a resource has been added to the target branch.
  • dAn incoming change means that the file has changed in the target branch.
  • dAn incoming deletion means that a resource was deleted from the target branch.
  • dAn outgoing addition means that the file was added to your workspace or source branch and is not yet in the target branch.
  • dAn outgoing change means that the file was changed in your workspace or source branch.
  • dAn outgoing deletion is a resource that has been deleted in your workspace or source branch.
  • dA conflicting addition means that the resource has been added in your workspace or source branch and in the target branch.
  • dA conflicting change means that the file has been changed in your workspace or local branch and in the target branch. A manual or automatic merge will be required. Also, any entries in the view that contain children that are conflicts will also be decorated with the conflict icon. This is done to make conflicts easy to find.
  • dA conflicting deletion means that the resource was deleted in your workspace or source branch and in the target branch.

此状态通过使用图标显示,也可以配置为将状态显示为附加到资源名称的文本。

  • d传入添加意味着资源已添加到目标分支。
  • d传入更改意味着文件在目标分支中已更改。
  • d传入删除意味着从目标分支中删除了资源。
  • d传出添加意味着文件已添加到您的工作区或源分支,但尚未在目标分支中。
  • d传出更改意味着文件在您的工作区或源分支中发生了更改。
  • d传出删除是已在您的工作区或源分支中删除的资源。
  • d添加冲突意味着资源已添加到您的工作区或源分支以及目标分支中。
  • d冲突更改意味着文件已在您的工作区或本地分支以及目标分支中更改。将需要手动或自动合并。此外,视图中包含冲突子项的任何条目也将使用冲突图标进行修饰。这样做是为了便于查找冲突。
  • d冲突删除意味着资源在您的工作区或源分支以及目标分支中被删除。

In your case, keep in mind those overlay icons can appear in additionof the statusoverlay icons:

在您的情况下,请记住,除了状态覆盖图标之外,还可以出现这些覆盖图标

status

地位

That includes:

包括了:

  • dirty (folder) - At least one file below the folder is dirty; that means that it has changes in the working tree that are neither in the index nor in the repository.
  • tracked - The resource is known to the Git repository and hence under version control.
  • untracked - The resource is not known to the Git repository and will not be version controlled until it is explicitly added.
  • ignored - The resource is ignored by the Git team provider. The preference settings under Team > Ignored Resources, "derived" flag and settings from .gitignore files are taken into account.
  • dirty - The resource has changes in the working tree that are neither in the index nor in the repository.
  • staged - The resource has changes which have been added to the index. Note that adding changes to the index is currently possible only in the commit dialog via the context menu of a resource.
  • partially-staged - The resource has changes which are added to the index and additional changes in the working tree that neither reached the index nor have been committed to the repository. See partial staging from the Git Staging viewfor how to do that.
  • added - The resource has not yet reached any commit in the repository but has been freshly added to the Git repository in order to be tracked in future.
  • removed - The resource is staged for removal from the Git repository.
  • conflict - A merge conflict exists for the file.
  • assume-valid - The resource has the "assume unchanged" flag. This means that Git stops checking the working tree files for possible modifications, so you need to manually unset the bit to tell Git when you change the working tree file. Also see Assume unchanged action.
  • 脏(文件夹)——文件夹下至少有一个文件是脏的;这意味着它在工作树中发生了既不在索引中也不在存储库中的更改。
  • tracked - 该资源是 Git 存储库已知的,因此处于版本控制之下。
  • 未跟踪 - Git 存储库不知道该资源,并且在明确添加之前不会对其进行版本控制。
  • 忽略 - 资源被 Git 团队提供者忽略。Team > Ignored Resources 下的首选项设置、“派生”标志和 .gitignore 文件中的设置都被考虑在内。
  • 脏 - 资源在工作树中发生了变化,既不在索引中也不在存储库中。
  • 暂存 - 资源已添加到索引中的更改。请注意,目前只能通过资源的上下文菜单在提交对话框中添加对索引的更改。
  • 部分暂存 - 资源具有添加到索引的更改以及工作树中既未到达索引也未提交到存储库的其他更改。有关如何执行此操作,请参阅Git 暂存视图中的部分暂存
  • 添加 - 资源尚未到达存储库中的任何提交,但已新添加到 Git 存储库以便将来跟踪。
  • 已删除 - 资源已暂存以从 Git 存储库中删除。
  • 冲突 - 文件存在合并冲突。
  • 假设有效 - 资源具有“假设未更改”标志。这意味着 Git 停止检查工作树文件是否有可能的修改,因此您需要手动取消设置该位以在您更改工作树文件时通知 Git。另请参阅假设操作不变