I've used a perl script to modify all tab characters in a php git repository and changed them all to 4 spaces.
$ find -iname *.php -exec perl -pi -e "s// /g" {}
I can commit this change with git commit
, but it will mark me as the author of all changed lines inside git blame
after this commit is made.
Is there any way to commit this massive change that doesn't mark me as the author of the changed lines, but retains the original author? That's a lot of history we don't really want to lose in our project.
Our purpose in replacing tabs with 4 spaces is not to make things appear different in git blame, but to follow proper PEAR coding standards. E.g. no tabs, use 4 spaces for indentation.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…