如何在 xcode 提交时触发自动缩进

How to trigger automatic indentation on commit in xcode

在Xcode中,是否可以在提交文件时自动触发文件Objective-C代码的缩进? 有人知道在 bash 中重新缩进 Objective-C 代码的工具吗?

您可以添加类似 uncrustify to the git pre-commit hook 的内容。