git: change styling (whitespace) without changing ownership/blame?

后端 未结 5 987
面向向阳花
面向向阳花 2020-11-29 04:15

We have a massive, ancient codebase that needs a lot of cleanup. We have always had coding standards and everyone has always tried to follow them, but they were not enforced

5条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-11-29 04:27

    In an ideal world there would be some way to rewrite history to look like the violations were never introduced

    git filter-branch does precisely that.

    http://git-scm.com/docs/git-filter-branch

    This has the same issues as all history rewriting commands do, as it essentially invalidates all cloned repositories.

提交回复
热议问题