Coder Social home page Coder Social logo

gitcomm's Introduction

GoDoc Go Report Card License: MIT

Git commit message formatter

Cli app to implement git message template Automate your commit message workflow with some rules

The name 'gitcomm' is short 'git commit message'.

Usage:

demo

Download and install it:

$ go get -u -d github.com/golgoth31/gitcomm/cmd
$ go install -o gitcomm github.com/golgoth31/gitcomm/cmd

Or install precompiled release binary.

Usage: gitcomm [-v] [-Acst] | [-u]

Automate git commit messaging

Source https://github.com/golgoth31/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`
  -c, --no-capitalize    Do not capitalize first letter of the strings
  -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>

Type should be one of the following:

  • 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 Processing

ISSUE_KEY #comment This is a comment ISSUE_KEY #resolved

Template is from this repo https://github.com/williampeterpaul/.git-commit-template

The seven rules of a great Git commit message

Keep in mind: This has all been said before.

  1. Separate subject from body with a blank line
  2. Limit the subject line to 72 characters
  3. Capitalize the subject line by default
  4. Do not end the subject line with a period
  5. Use the imperative mood in the subject line // That rule is for user impl
  6. Wrap the body at 72 characters. Limit the body length to 320 characters
  7. 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

gitcomm's People

Contributors

karantin2020 avatar golgoth31 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.