git whitespace woes

后端 未结 2 1446
南旧
南旧 2020-11-30 01:51

Conflicts on whitespace suck

Whitespace has ended up being a horrible pain for me while using git.

git config apply.whitespace=strip
2条回答
  •  旧巷少年郎
    2020-11-30 02:19

    If you are going to turn on those settings, you need to schedule a day where ALL source code in your project gets its whitespace uniformly stripped, by running a script, or by saving every file from an editor that will perform the strip on save. Then, all future commits will be policed by the settings, so all should be well going forward.

提交回复
热议问题