shares
 

Rejecting changes: How to 'revert a chunk' on Overleaf

By Lian Tze Lim
Reverting a chunk via the compare mode in Overleaf - animated gif

(click the gif to view a bigger version)


You may already know about how the version history feature on Overleaf can be used to save milestone versions of your project. By giving these milestones a specific label, you can easily restore a previously saved version using the 'restore' option under the VERSIONS menu.

Using the Versions menu on Overleaf

You may even know that you can track the changes between the current state of your project and a previously saved version, by using the 'compare' function to the right of the saved version.

But did you know that you can also revert specific changes ('chunks') to the previous version – perhaps to reject some changes made by a co-author, or to reverse a recent erroneous line of code, but accepting other edits? This effectively lets you treat your co-author's revisions as suggestions, where you can us the 'compare mode' as a 'suggest mode' for accepting or rejecting them.

Reverting a chunk via the compare mode in Overleaf

When you're in the compare mode, you'll see the corresponding chunks of changes in the current version (on the left) and the saved version to compare (on the right). You can either accept each chunk by leaving it be, or reject it by clicking the 'revert chunk' arrow between the new and old versions (highlighted by the bright pink arrow above). Just remember to click the COMPARE button again when you're done reviewing the changes to exit compare mode!

Lian Tze Lim

Lian Tze Lim

Community TeXpert

Computer scientist, once-lecturer, trainer. Enjoys tinkering with LaTeX in the name of productive procrastination (ahem). Personal motto: "all research students are insane at one time or another".