I use git-auto-commit-mode
(https://github.com/ryuslash/git-auto-commit-mode) in Emacs to preserve my files automatically sync with my repo.
However, I got a massive list of commits per day (the package makes a commit in every save). At the end of the day I finish with something like this
Sat Feb 4 12:57:14 2023 fileA.txt
Sat Feb 4 12:56:52 2023 fileA.txt
Sat Feb 4 12:55:57 2023 fileA.txt
--------- Different file --------
Sat Feb 4 12:54:47 2023 fileB.txt
Sat Feb 4 12:45:04 2023 fileB.txt
Sat Feb 4 12:45:04 2023 fileB.txt
Sat Feb 4 12:44:51 2023 fileB.txt
--------- Different day ---------
Fri Feb 3 14:44:27 2023 fileA.txt
Fri Feb 3 14:44:05 2023 fileA.txt
Fri Feb 3 14:41:35 2023 fileA.txt
--------- Different file --------
Fri Feb 3 14:40:54 2023 fileB.txt
Fri Feb 3 14:40:17 2023 fileB.txt
Fri Feb 3 14:39:14 2023 fileB.txt
I would like to have a cleaner history like this
Sat Feb 4 12:57:14 2023 fileA.txt
Sat Feb 4 12:54:47 2023 fileB.txt
Fri Feb 3 14:44:27 2023 fileA.txt
Fri Feb 3 14:40:54 2023 fileB.txt
Where I preserve the last commit day per day and per file.
I can do this using git rebase
manually, but I couldn't figure it out how to do it automatically for the whole history, taking account deletions and renames.
Thanks for any help.