| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
| <html lang="en"> |
| <head> |
| <meta name="copyright" content= |
| "Copyright (c) IBM Corporation and others 2000, 2013. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page."> |
| <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
| <meta http-equiv="Content-Style-Type" content="text/css"> |
| <link rel="STYLESHEET" href="../book.css" charset="ISO-8859-1" type="text/css"> |
| <title>Local history</title> |
| </head> |
| <body> |
| <h1>Local history</h1> |
| <p>Every time an editable file is saved in the Workbench, the Workbench updates the local history of that file and |
| logs the changes that have been made. The local history of a file can then be accessed and a previously saved copy of |
| the file can be reverted to, as long as the desired state is recent enough in the save history.</p> |
| <ol> |
| <li class="Steps">Create a new file named <em class="FileName">sampleFile.txt</em>.</li> |
| <li class="Steps">In the editor for <em class="FileName">sampleFile.txt</em> modify the file by adding the line |
| "change1" and saving the file.</li> |
| <li class="Steps">Repeat this by entering a new line "change2" and saving it again.</li> |
| <li class="Steps">Add a third line "change3" and save it again.</li> |
| <li class="Steps">Right-click the file in a navigation view (e.g. the Project Explorer) and select <em class= |
| "UILabel">Team > Show Local History</em>. |
| <p><em>Note:</em> Repository tooling may override the <em class="UILabel">Team > Show Local History</em> |
| operation to provide a unified history for a file.</p> |
| </li> |
| <li class="Steps">The History view opens and shows the history for the file.</li> |
| <li class="Steps">The top entry in the view represents the current contents of the file. The next represents the |
| previous contents and so on. Right-click on the previous entry and select <em class="UILabel">Compare Current with |
| Local</em> to open a Compare editor that displays the differences between the Workbench file and the specific copy |
| of the file selected in the local history.</li> |
| <li class="Steps">Right-click on the previous entry again and select <em class="UILabel">Get Contents</em>. This |
| replaces the Workbench's copy of <em class="FileName">sampleFile.txt</em> with the chosen local history item.</li> |
| <li class="Steps">Observe that the <em class="FileName">sampleFile.txt</em> editor now contains two lines.</li> |
| </ol> |
| </body> |
| </html> |