You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi. In my project we do use conventional commits, but we don't use husky or Yorkie, also we don't want to force people to use emojis in commits. However, personally, I like putting emojis into my commits and I want it to be automated. Therefore, I've added devmoji into my .git/hooks/ manually. Here is info on how I have this done. In the root of project, run:
cp .git/hooks/prepare-commit-msg.sample .git/hooks/prepare-commit-msg # note, it's important to copy this to make sure file is executableecho"#\!/bin/sh\n\nCOMMIT_MSG_FILE=\$1\nCOMMIT_MSG=\$(cat \$COMMIT_MSG_FILE)\n\necho \"\${COMMIT_MSG}\" | devmoji > \$1"> .git/hooks/prepare-commit-msg
Would be great to have this added to the README of the project. Thanks!
The resulting content of .git/hooks/prepare-commit-msg would be:
I'm guessing OP was running macOS. On Linux you need to use echo -e in order to enable interpolation of backslash escapes. Then their hook works great. Another good reason not to use Husky is it falls apart when you try and perform an interactive rebase and that's frustrating when you're right at the finish line.
Hi. In my project we do use conventional commits, but we don't use husky or Yorkie, also we don't want to force people to use emojis in commits. However, personally, I like putting emojis into my commits and I want it to be automated. Therefore, I've added
devmoji
into my .git/hooks/ manually. Here is info on how I have this done. In the root of project, run:Would be great to have this added to the README of the project. Thanks!
The resulting content of
.git/hooks/prepare-commit-msg
would be:The text was updated successfully, but these errors were encountered: