GithubHelp home page GithubHelp logo

kommit's Introduction

Version Shellcheck

Kommit

Create more detailed commit messages without committing!

asciicast

While we were looking at this lovely project, we have seen some, ehmmm, downsides of it. Why not? let’s keep safe the source code and collect all the information somewhere else?

Idea

  • Commit often, Commit more!
  • A mini shell tool for storing messages: git kommit -m "Fixes a bug in XXX function"
  • Store your commit-extra information in to a hidden file .git/kommit-message
  • Append the .git/kommit-message to the original commit message in prepare-commit-msg hook and delete .git/kommit-message file after commit.

Usage

usage: git-kommit [-m <msg> | -t <msg> | -c | -e | -s | -i | -r | -h]

    -m <msg>        append message
    -t <msg>        append message with timestamp
    -c              check if hook installed ?
    -e              edit messages
    -s              show current message(s)
    -i              install kommit hook to .git/hooks/prepare-commit-msg
    -r              remove kommit hook, delete .git/hooks/prepare-commit-msg
    -h              print this message

Basic usage is shown below:

  • git kommit -m "Message" : Append new message.
  • git kommit -t "Message" : Append new message with timestamp.
  • git kommit -s : Show current messages
  • git kommit -e : Edit messages. This uses $EDITOR environment variable.

Sample Output

    # Your commit title

    - Your note...
    - Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
    eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut
    enim ad minim veniam, quis nostrud exercitation ullamco laboris
    nisi ut aliquip ex ea commodo consequat.

Install: Kommit

OS X Users can install via Homebrew.

brew install kommit

You can download or get it via curl. Go to your desired bin/ folder or go somewhere which is in the $PATH:

cd ~/bin/          # example bin/ folder
curl -O https://raw.githubusercontent.com/bilgi-webteam/kommit/master/bin/git-kommit
chmod +x git-kommit

Usage

Super easy;

  • git kommit -i : Installs hook.
  • git kommit -r : Removes hooks.
  • git kommit -c : Checks if the hooks is installed.
  • git kommit -b : Shows bash completion snippet
  • git kommit -m "Message" : Append new message.
  • git kommit -t "Message" : Append new message with timestamp.
  • git kommit -s : Show current messages.
  • git kommit -e : Edit messages. This uses $EDITOR environment variable.

Don’t forget, git-kommit way only works under git folder. To have the bash completion snippet; use git kommit -b and grab the code and add it to your shell environment.

Environment Variables

Kommit checks $KOMMIT_BULLET and $KOMMIT_WRAP_AT variables. Default bullet style for message is - You can change this via;

KOMMIT_BULLET="*" git kommit -m "Hello World"   # or,

export KOMMIT_BULLET="*"                    # define it in your .bashrc

Also, default value for wrap text is: 72 you can change it via;

KOMMIT_WRAP_AT=60 git kommit -m "Hello World"   # or,

export KOMMIT_WRAP_AT=60                    # define it in your .bashrc

IDE Integrations

Change Log

2016-03-05

  • You don’t need to pop the editor. git commit -m "message" will also insert the kommit’s messages. PR8

2016-02-10

  • Switched to git-kommit filename, full integration with git

2016-01-22

  • Added: kommit -t feature
  • Added: You don’t need to install hook, it installs it self in the first message addition.
  • Added: Bash completion snippet

2016-01-20

  • MIT license added.
  • Contributers list added.
  • IDE integration packages list added.

2016-01-19

  • New feature; edit messages! kommit -e
  • New feature; check hook kommit -c

2016-01-16

  • Release v0.1.0

2016-01-15

  • Initial commit!

Contribute

Feel free to send your PR’s!

  1. fork (https://github.com/bilgi-webteam/kommit/fork)
  2. Create your branch (git checkout -b my-features)
  3. commit yours (git commit -am 'added killer options')
  4. push your branch (git push origin my-features)
  5. Than create a new Pull Request!

Contributers

Other contributers can be found here.

License

This project is licensed under MIT.

kommit's People

Contributors

afbroman avatar ekinertac avatar tperrier avatar vigo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kommit's Issues

Old and new command act differently

I'm sure they shouldn't act differently, and I doubt whether just typing kommit should even work anymore. Perhaps give a little deprecation notice for a few versions and then stop working completely...?

tom > ~/dev/schooling > brew install kommit                                                                                                                                                                                    master
==> Downloading https://homebrew.bintray.com/bottles/kommit-1.1.0.el_capitan.bottle.tar.gz
Already downloaded: /Library/Caches/Homebrew/kommit-1.1.0.el_capitan.bottle.tar.gz
==> Pouring kommit-1.1.0.el_capitan.bottle.tar.gz
🍺  /usr/local/Cellar/kommit/1.1.0: 4 files, 11.2K
 tom > ~/dev/schooling > kommit                                                                                                                                                                                                 master
Invalid usage...
usage: kommit [-m <msg> | -c | -e | -s | -i | -r | -h]

    -m <msg>        append message
    -c              check if hook installed ?
    -e              edit messages
    -s              show current message(s)
    -i              install kommit hook to .git/hooks/prepare-commit-msg
    -r              remove kommit hook, delete .git/hooks/prepare-commit-msg
    -h              print this message

 tom > ~/dev/schooling > git kommit                                                                                                                                                                                             master
Alias tip: g kommit
Invalid usage...
usage: git-kommit [-m <msg> | -t <msg> | -c | -e | -s | -i | -r | -h]

    -m <msg>        append message
    -t <msg>        append message with timestamp
    -c              check if hook installed ?
    -e              edit messages
    -s              show current message(s)
    -i              install kommit hook to .git/hooks/prepare-commit-msg
    -r              remove kommit hook, delete .git/hooks/prepare-commit-msg
    -h              print this message

 tom > ~/dev/schooling >

Improving asciicinema in Readme

it need to more clear explanation of the tool. Eg scenario:

  • install Kommit
  • git init foobar && cd foobar
  • touch foo.txt
  • kommit -m 'create foo.txt'
  • vim foo.txt paste some code in it
  • kommit -m 'add some crazy feature'
  • vim foo.txt paste another code in it
  • kommit -m 'add another freaking feature'
  • git commit

permission denied on [git kommit -e]

Hello, first of all thanks for creating this awesome helper.

I had installed git kommit via brew and using in my old macbook pro (El Capitan as OS and zsh as shell) with no trouble.

However, after I switched to a new macbook pro and installed git kommit to it (again, El Capitan, zsh and brew) I started to getting permission denied error when I want to edit my kommit messages by using git kommit -e command.

Here's a screenshot (btw I have a gk alias for git kommit):

screen shot 2016-06-24 at 18 57 27

Do you have any idea or suggestion to overcome this problem?

Feature request: Bind commit messages to files.

Eg, if I just changed something in file1.md, I could use kommit -f file1.md -m 'Did something smart', and if I don't necessarily decide to commit that change right away, it would wait untill I git added file1.md.

This would also help with branches, though full branch support would be a little different.

Also, shouldn't just the command kommit infer -m ?

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.