For Objective-C
When committing code, added files will been formatted
auto format code via git-hook(pre-commit)
Install dependence
brew install clang-format
Init pre-commit(git-hook) file
cd $PROJECT
cd .git/hooks
wget https://raw.githubusercontent.com/motherapp/githook-clang-format/master/clang-format.hook -O pre-commit
sudo chmod +x pre-commit
vim .git/hooks/pre-commit