
SECTION 2
Editor Insights
See also Tip 10, Roll Back Changes in Files Not Under Version Control (Local History), and Tip 11,
Restore Deleted Files Not Under Version Control (Local History).
Tip Source
http://blogs.sun.com/roumen/entry/netbeans_quick_tip_10_diffing
Tip 10: Roll Back Changes in Files Not Under Version Control
(Local History)
One advantage of keeping your files under version control is that you can merge changes when
you work in a team. Another advantage is that you can revert to a previous revision in case a
change breaks the build. The option to roll back changes is also very handy when you work alone
and you do not use a version control system.
The IDE tracks modifications to project files that are open in the editor, and keeps a local history
of changes. Every time you save a file, a new revision is committed.
To get an overview of changes made to a file, select the file in the Projects or Files window. Right-
click the file and choose Local History > Show Local History from the context menu. The graphical
Diff Viewer opens in the main window and displays two revisions side by side. (See also Tip 9,
Compare Two Files Line by Line (Diff).)
This is how you roll back changes and restore a previous revision.
1. Select a file in the Projects or Files window.
2. Right-click the file and choose Local History > Revert to... from the context menu. The Revert
to... dialog opens.
16
© 2009 Sun Microsystems. All rights reserved.
This publication is protected by copyright. Please see page 2 for more details.
100 NetBeans
™ IDE Tips & Tricks
by Ruth Kusterer