emacs does not create backups of files inside a git repository. I would like to have them saved, since I often rely on them for undoing some changes before committing my changes to the git repo.
I was using xemacs until recently, and it would always create the usual *~
files at first save. But emacs doesn't do it if working inside a git project: it makes the usual backup files, when working outside the project, but not the ones inside a git repo.
I tried the following in my .emacs
file without success:
(setq make-backup-files t)
(setq backup-inhibited nil)
I have looked at the doc here:
https://www.gnu.org/software/emacs/manual/html_node/elisp/Making-Backups.html
and in the section about backup-inhibited
it seems as if emacs checks each time if the file is controlled by a control version system, and in case it is, it wouldn't create the backup file. This check might be the one preventing the creation of the desired backup file. Is there a way to change this behavior?