Giter Site home page Giter Site logo

git-semantic-commits's Introduction

Semantic Git commit messages

Inspired by Sparkbox's awesome article on semantic commit messages.

What is this?

These are very simple custom git commands that enforce the git user to write better git commit messages. If still confused, read the article above.

Installation:

  1. Clone this repo, prefferably in your $HOME directory. git clone https://github.com/JacoboSegovia/git-semantic-commits.git ~/.git-semantic-commits

  2. Add the folder to your $PATH.

  • if using Bash, open ~/.bashrc with your favourite editor and add this line:
    export PATH=$PATH:$HOME/.git-semantic-commits:$PATH

  • if using Zsh, open ~/.zshrc with your favourite editor and add this line:
    export PATH=$PATH:$HOME/.git-semantic-commits:$PATH

    Tip: If you're using Cygwin, open it and type 'echo $USERPROFILE'. This will show you the location of the $HOME directory.

  1. Save the file and source the changes in bashrc/zshrc: source ~/.bashrc or source ~/.zshrc
  2. Commit away!

Usage

There are 8 new Git commands now.

New command -> what it does:

  • git feat "commit-message-here" -> git commit -m 'feat: commit-message-here'
  • git docs "commit-message-here" -> git commit -m 'docs: commit-message-here'
  • git chore "commit-message-here" -> git commit -m 'chore: commit-message-here'
  • git fix "commit-message-here" -> git commit -m 'fix: commit-message-here'
  • git refactor "commit-message-here" -> git commit -m 'refactor: commit-message-here'
  • git style "commit-message-here" -> git commit -m 'style: commit-message-here'
  • git test "commit-message-here" -> git commit -m 'test: commit-message-here'
  • git localize "commit-message-here" -> git commit -m 'localize: commit-message-here'

If you would still like to use your text editor for your commit messages you can omit the message, and do your commit message in your editor.

  • git feat -> git commit -m 'feat: ' -e

You can add a changelog message to integrate in conventional-changelog

  • git feat "log-message-here" "commit-message-here" -> git commit -m 'feat(log-message-here): commit-message-here'

How to contribute

Open a pull request/issue or fork this repo and submit your changes via a pull request.

git-semantic-commits's People

Contributors

fteem avatar jacobosegovia avatar stuartc avatar

Watchers

James Cloos avatar  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.