To start this exercise, we just need to create a branch and check it out. We need to disable the current prepare-commit-msg hook; we can do this by simply renaming it. Now, we can start working on the commit-msg hook by using the following command:
$ git checkout -b commit-msg-example Switched to a new branch 'commit-msg-example' $ mv .git/hooks/prepare-commit-msg .git/hooks/prepare-commit-msg.example