git-format-staged

  • By Jesse Hallett

https://github.com/hallettj/git-format-staged

A git add-on that formats staged changes to code files using an automatic formatter like Prettier, and works seamlessly with partially-staged files. There are other tools that do the same job; but git-format-staged takes a unique, and in my opinion elegant, approach.

For background on this project, and for some background on git’s internal workings, see my post, Autmotic Code Formatting for Partially-Staged Files.