How do I run a code formatter over my source without modifying git history?
问题 I am trying to format an entire repo using a code formatter tool. In doing so, I want to keep information about who committed which line, so that commands like git blame still show the correct information. By this, I mean it should show the author that previously edited each line (before it was formatted). There is the git filter-branch command which allows you to run a command against each revision of the repo starting from the beginning of time. git filter-branch --tree-filter '\ npx