help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Reviewing versioned backups


From: Michael Heerdegen
Subject: Re: Reviewing versioned backups
Date: Sun, 28 Mar 2021 01:38:10 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Philip Kaludercic <philipk@posteo.net> writes:

> I have been using version-control for years now, but have always
> wondered if there was a better way to review previous versions besides
> just going into your backup directory and manually comparing them. Is
> there maybe a vc backend that uses the backup information? Or has
> someone written some code to make it easier that they would care to
> share?

Magit has the "wip" modes that do more or less exactly that if your VCS
is Git.  Once set up, backups are created automatically before and/or
after each save (or at will).  They are saved in a chain of commits
under a special reference name derived from your current branch's name.

Big advantage: Git handles backups and you can do all the cool things
like adding tags and annotations; Git can use delta compression to avoid
wasting disk space, and all of this stuff.  One disadvantage currently:
When you accidentally wip-commit something you didn't want to (e.g. a
very large file or something containing passwords), you currently need
to repair that accident using lowest-level git commands unless you can
live with resetting the whole history to a prior state.  But apart from
that, it works conveniently, there are log commands for your wip commits
and such things etc.

Michael.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]