![]() However, you can create a patch file with changes relative to a specific revision, which you can share with others. Local History does not support shared access, it is stored locally and intended only for personal use. In the dialog that opens, type any meaningful name for the label and click OK. Select File | Local History | Put Label from the main menu. You can always add a new label to mark the current state of the Local History, for example, right before you start a massive refactoring. Some revisions are automatically marked with labels based on predefined events: running tests, deploying apps, committing changes, and so on. Local History revisions are normally marked with timestamps, which are not easy to navigate. On the left, select the revision that contains the file you want to restore, right-click that file, and choose Revert Selection.Īdd labels to specific states Local History Select the node that contained the file you deleted in the Project tool window, right-click it and choose Local History | Show History from the context menu. If you've accidentally deleted a file that was not under version control, you can restore it with Local History. There, use the chevron button to revert the required changes. In the Project tool window ( Alt+1), right-click the node or select and right-click the files for which you want to see the history and select Local History | Show History.įind the change that you want to revert and click on the toolbar.Ĭlick on the toolbar to view the change in the diff viewer. Similarly to viewing Local History for one file, you can view it for an entire folder, project, or multiple individual files. ![]() Type a label name or a piece of file content in the search bar of the Local History dialog to search for file revisions. In the diff view on the right locate the piece of code you want to restore click the chevron button to copy it from the left pane. To restore a specific code fragment, select the revision that contains that fragment. To revert the whole file to the state of this revision, right-click it and choose Revert from the context menu or click on the toolbar. The right-hand pane shows a diff viewer which displays the differences between each revision and the current state of the file. In the dialog that opens, the left-hand pane shows a list of all saved revisions of the current file with timestamps. Right-click anywhere in the editor and choose Local History | Show History from the context menu. With P圜harm you can restore that change in a couple of clicks. The Undo action can't help you here because that change is too far away, and you'll be forced to discard other changes if you use it. Let's imagine you made a series of changes to a file since your last commit before your realized you've deleted a meaningful chunk of code. It also has a retention period and maximum size, so revisions are not guaranteed to persist. Local History is cleared when you install a new version of P圜harm. Note that Local History is not a replacement for a proper version control for long-term versioning. It may also serve as a recovery source if your computer restarts unexpectedly before you can take any action. It automatically records your project's state as you edit code, run tests, deploy applications, and so on, and maintains revisions for all meaningful changes made both from the IDE and externally.Īcting as your personal version control system, Local History lets you restore deleted files, bring back separate changes, or roll back to any state of a file even if no version control is enabled for your project yet, or if an unwanted change was made after your last commit. Unlike version control systems, which only keep track of the differences made between commits, Local History offers much more. Local History helps you constantly track all changes made to a project independently of version control.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |