Cli app to implement git message template
Automate your commit message workflow with some rules
The name 'gitcomm' is short 'git commit message'.
Usage:
Download and install it:
$ go install github.com/studyzy/gitcomm/cmd/gitcomm@latest
Or install precompiled release binary.
Usage: gitcomm [-v] [-Ast] | [-u]
Automate git commit messaging
Source https://github.com/studyzy/gitcomm
Options:
-V, --version Show the version and exit
-A, --addAll Adds, modifies, and removes index entries to match the working tree. Evals `git add -A`
-v, --verbose Switch log output
-s, --show Show last commit or not. Evals `git show -s` in the end of execution
-t, --tag Create an annonated tag for the next logical version
-u, --undo Revert last commit
# type(<scope>): <Subject>
# <Body>
# * <Footer>
- feat (new feature)
- fix (bug fix)
- docs (changes to documentation)
- style (format, missing semi colons, etc; no code change)
- refactor (refactor production code)
- test (add missing tests, refactor tests; no production code change)
- chore (update grunt tasks etc; no production code change)
- version (description of version upgrade)
Scope is just the scope of the change. Something like (admin) or (teacher).
Subject should use imperative tone and say what you did.
The body should go into detail about changes made. Use the body to explain what and why vs. how
The footer should contain any git issue references or actions.
ISSUE_KEY #comment This is a comment
ISSUE_KEY #resolved
Template is from this repo https://github.com/williampeterpaul/.git-commit-template
Follows this https://chris.beams.io/posts/git-commit/
Keep in mind: This has all been said before.
- Separate subject from body with a blank line
- Limit the subject line to 72 characters
- Capitalize the subject line
- Do not end the subject line with a period
Use the imperative mood in the subject line// That rule is for user impl- Wrap the body at 72 characters. Limit the body length to 320 characters
Use the body to explain what and why vs. how// That rule is for user impl
Example commit message:
Redirect user to the requested page after login
https://trello.com/path/to/relevant/card
Users were being redirected to the home page after login, which is less
useful than redirecting to the page they had originally requested before
being redirected to the login form.
* Store requested path in a session variable
* Redirect to the stored location after successfully logging in the user
Source is https://robots.thoughtbot.com/5-useful-tips-for-a-better-commit-message