aboutsummaryrefslogtreecommitdiff

git-save

git-save is a Git command designed for commitless version control. The instruction git save is equivalent to git add . && git commit --allow-empty-message -m "".

What is commitless version control?

Commitless version control is a software development method with two rules:

  1. Make saves instead of commits. A save is like a commit, except
    • it has no commit message, and
    • it includes all changes in all files.
  2. Don't worry about keeping a clean, thematically organized commit history. A save should contain all changes made since the last save, regardless of theme.

In summary, eschew order for chaos.

What is git-save?

git-save is a tool that makes it easy to use Git as a commitless version control system. It has a simple interface:

$ git save

In combination with a file watcher, saves can be performed automatically whenever you write to the files in your project:

$ watch example.doc | while read; do git save; done

Benefits

For the single developer, commitless version control presents several benefits:

  • Lower commit hurdle. Using git-save is as easy as saving a Microsoft Word document.
  • More comprehensive history. Because saves don't need to be complete, isolated or even well-written, they can be made much more often. This results in a much more comprehensive history, where changes that normally wouldn't make it into a commit are included as well.
  • Lower risk of losing work. Because saves are made more often than commits, and saves automatically capture all changes, not just a carefully selected few, potentially important changes rarely remain uncommitted, hanging in the air and easily lost.

Additionally, if commitless version control were to become popular, it might have a few more far-reaching positive effects:

  • Improved tooling. Lacking commit messages, developers would be forced to rely more on information about which files were changed and in which ways -- which version control tools would be forced to convey better. This information is ultimately more precise than a commit message.
  • Beginner-friendliness. Without the requirement to keep a clean commit history, and the accompanying mental burden, it would be much easier for beginners to get into the habit of putting their projects under version control.