Project Tracking with Revision Control

The Plan:

I wanted an easy way of keeping track of all project changes and meeting notes.

I use orgmode files in Emacs to keep track of personal and professional projects. Each project has its own org file. I modify these files as new information is added over time and outdated information is removed.

I wanted revision control for these files so that I can go back in time and see a log of all the changes and when they were made.

For example, if I modify a project file during a major stakeholder meeting, I want to be able to go back to that date and see exactly what changes were made.

I also wanted this process to be automated. To avoid the possibility of forgetting to add a file to revision control after changes.

Implementation:

To have the ability of auto committing files to revision control upon each save I added the git-auto-commit-mode to my Emacs setup. Since I wanted all files in my project folder to be auto tracked I added a .dir-locals.el file in the project files directory with the following code in it:

((nil . ((eval git-auto-commit-mode 1))))

I also added the following line to my Emacs configuration so that it asks for a commit message every time I save the file. It is easier to review the changes with commit messages next to each revision.

(setq gac-ask-for-summary-p t)

Reviewing the Changes:

My preferred method for reviewing the changes is to use the magit command magit-log-buffer-file. It gives me a list of all the revisions for the current file on one side and selecting any one of them shows the changes in that revision on the other side.

Voila, the whole history of all projects is now always tracked and available.