Automation — PHP Code Formatting before(pre) git commit

Automation — PHP Code Formatting before(pre) git commit

·

1 min read

Who cares about code formatting and comments? Humans...

Imagine yourself fixing code style issues day after day. Wouldn't you want to do something more interesting by formatting code before committing?

Want to learn how to format code in PHP before committing to git repository?

Git hooks are scripts that will run when a certain event occurs in git like git push, git pull, git commit, etc…We can find git hooks at .git/hooks in a particular git repository.

Pre-commit is a git hook, that triggers custom scripts or commands during the execution of a git commit.

Here Automation - PHP Code Formatting before(pre) git commit to check out.