Fix unhandled CoreException in BranchOperation.refreshProjects
[egit.git] / org.eclipse.egit.doc / userguide / Inspecting-the-state-of-the-Repository.html
blob42ee1ff516700f1de298e88470bc6614b77aaa30
1 <?xml version="1.0" encoding="utf-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2 <html xmlns="http://www.w3.org/1999/xhtml">
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5 <title>EGit User Guide - Inspecting the state of the Repository</title>
6 <link type="text/css" rel="stylesheet" href="book.css" />
7 </head>
8 <body>
9 <table class="navigation" style="width: 100%;" border="0" summary="navigation">
10 <tr>
11 <th style="width: 100%" align="center" colspan="3">Inspecting the state of the Repository</th>
12 </tr>
13 <tr>
14 <td style="width: 20%" align="left">
15 <a href="Working-with-remote-Repositories.html" title="Working with remote Repositories">
16 <img alt="Previous" border="0" src="images/prev.gif" />
17 </a>
18 </td>
19 <td style="width: 60%" align="center" />
20 <td style="width: 20%" align="right">
21 <a href="Committing-changes.html" title="Committing changes">
22 <img alt="Next" border="0" src="images/next.gif" />
23 </a>
24 </td>
25 </tr>
26 <tr>
27 <td style="width: 20%" align="left" valign="top">Working with remote Repositories</td>
28 <td style="width: 60%" align="center" />
29 <td style="width: 20%" align="right" valign="top">Committing changes</td>
30 </tr>
31 </table>
32 <hr />
33 <h1 id="Inspecting_the_state_of_the_Repository">Inspecting the state of the Repository</h1>
34 <h2 id="Label_Decorations">Label Decorations</h2>
35 <p>Label decorations show Git specific information on resources under Git version control. They appear in all views showing model objects, like Package Explorer, Project Explorer, Navigator, Hierarchy View.</p>
36 <p>The Git label decorations can be switched on globally in the Preference Menu (Window -> Preferences) under General -> Appearance -> Label Decorations. </p>
37 <p>More detailed settings can be done in the Preferences under Team -> Git -> Label Decorations.</p>
38 <p>There are two different types of label decorations: text decorations and icon decorations.</p>
39 <p>
40 <b>Text Decorations</b>
41 <br />
42 Text decorations appear on the left or right side of the text label. They can be configured on the Preferences dialog under Team -> Git -> Label Decorations on the tab "Text Decorations". For example, he default for a dirty resource is a > on the left side of its name.
43 </p>
44 <p>These are the default settings:</p>
45 <p>
46 <img border="0" src="images/01-TextDecorations.png" />
47 </p>
48 <p>For files and folders there are the variables "name", "dirty" and "staged". "Dirty" and "staged" are flags; if they are true, the text after the colon is displayed. For the project name there is additionally the variable "branch". If no branch is checked out the decoration shows the name of the commit.</p>
49 <p>
50 <b>Icon Decorations</b>
51 <br />
52 Icon decorations appear on the lower left corner of the icon label. They can be configured on the Preferences dialog under Team -> Git -> Label Decorations on the tab "Icon Decorations".
53 </p>
54 <p>These are the default decorations:</p>
55 <p>
56 <img border="0" src="images/02-IconDecorations.png" />
57 </p>
58 <ul>
59 <li>
60 <b>dirty (folder)</b> - 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.
61 </li>
62 <li>
63 <b>tracked</b> - The resource is known to the Git repository.
64 </li>
65 <li>
66 <b>untracked</b> - The resource is not known to the Git repository.
67 </li>
68 <li>
69 <b>ignored</b> - The resource is ignored by the Git team provider. Here only the preference settings under Team -> Ignored Resources and the "derived" flag are relevant. The .gitignore file is not taken into account.
70 </li>
71 <li>
72 <b>dirty</b> - The resource has changes in the working tree that are neither in the index nor in the repository.
73 </li>
74 <li>
75 <b>staged</b> - The resource has changes which are added to the index. Not that adding to the index is possible at the moment only on the commit dialog on the context menu of a resource.
76 </li>
77 <li>
78 <b>partially-staged</b> - The resource has changes which are added to the index and additionally changes in the working tree that are neither in the index nor in the repository.
79 </li>
80 <li>
81 <b>added</b> - The resource is not yet tracked by but added to the Git repository.
82 </li>
83 <li>
84 <b>removed</b> - The resource is staged for removal from the Git repository.
85 </li>
86 <li>
87 <b>conflict</b> - A merge conflict exists for the file.
88 </li>
89 <li>
90 <b>assume-valid</b> - 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. This setting can be switched on with the menu action Team->Assume unchanged (or on the command line with git update-index --assume-unchanged).
91 </li>
92 </ul>
93 <h2 id="Commit_dialog">Commit dialog</h2>
94 <p>A summary of the status of all changed tracked files can be seen on the commit dialog. When you doble click on a file the changes to be committed are displayed in a compare dialog. As Egit always commits the content of the working tree (commit -a) the compare dialog will compare the working tree with the last commit.</p>
95 <h2 id="Comparing_Content">Comparing Content</h2>
96 <p>In daily work most commonly you will want to see the changes between your last commit, your index, and your current working tree.</p>
97 <p>
98 <b>Compare working tree with index</b>
99 <br />
100 The difference between the current working directory and the index can be viewed from the context menu Compare With -> Git Index.
101 </p>
103 <img border="0" src="images/03-CompareWithIndex.png" />
104 </p>
106 <b>Compare working tree with last commit</b>
107 <br />
108 This feature is implemented in the Commit dialog. Double clicking on an entry opens a compare dialog.
109 </p>
111 <b>Compare index with last commit</b>
112 <br />
113 This feature is not implemented yet.
114 </p>
115 <h2 id="Quickdiff">Quickdiff</h2>
116 <p>Instead of using a compare editor you can enable quick diff support and see the changes within the text editor. This feature can be enabled via the General > Editors > Text Editors > Quick Diff preference page:</p>
118 <img border="0" src="images/04-QuickDiffPreferences.png" />
119 </p>
120 <p>You then will see the difference annotation on the left hand side of the editor:</p>
122 <img border="0" src="images/05-QuickDiffInEditor.png" />
123 </p>
124 <p>If you move your mouse over the annotation you see the content of the version you are comparing to:</p>
126 <img border="0" src="images/06-QuickDiffInEditorPopup.png" />
127 </p>
128 <p>Per default, the comparison is against the HEAD. You can determine the version you are comparing to, the so-called quickdiff baseline, from the context menu of a commit in the history view (Team -> Show in Resource History). Here are three menu entries:</p>
129 <ul>
130 <li>
131 <b>Set as quickdiff baseline</b> - Compare against the selected commit
132 </li>
133 <li>
134 <b>Reset quickdiff baseline to HEAD</b> - Compare against HEAD.
135 </li>
136 <li>
137 <b>Reset quickdiff baseline to first parent of HEAD</b> - Compare against the first commit before HEAD.
138 </li>
139 </ul>
140 <hr />
141 <table class="navigation" style="width: 100%;" border="0" summary="navigation">
142 <tr>
143 <td style="width: 20%" align="left">
144 <a href="Working-with-remote-Repositories.html" title="Working with remote Repositories">
145 <img alt="Previous" border="0" src="images/prev.gif" />
146 </a>
147 </td>
148 <td style="width: 60%" align="center">
149 <a href="EGit User Guide.html" title="EGit User Guide">
150 <img alt="EGit User Guide" border="0" src="images/home.gif" />
151 </a>
152 </td>
153 <td style="width: 20%" align="right">
154 <a href="Committing-changes.html" title="Committing changes">
155 <img alt="Next" border="0" src="images/next.gif" />
156 </a>
157 </td>
158 </tr>
159 <tr>
160 <td style="width: 20%" align="left" valign="top">Working with remote Repositories</td>
161 <td style="width: 60%" align="center" />
162 <td style="width: 20%" align="right" valign="top">Committing changes</td>
163 </tr>
164 </table>
165 </body>
166 </html>