Giter VIP home page Giter VIP logo

branch-msg's Introduction

Why branch-msg

All we know that Git is designed to "forget" the original branch that a commit comes from.

This information is important (or useful) in some scenarios. For example, to matching a commit with your issue tracking system. Or, make it easier to dig into the history to reason about a certain bug.

For actually capture such information, in some project, we are forced to leave the "issue id" or the "branch name" explicitly. That's tedious.

Here is branch-msg

Simple goto the root of your git repo, where .git/ sits.

run:

# if it's the first time
npm install -g branch-msg

# init the git repo's commit-msg hook
branch-msg-init

And from now on, your commit message will have the following appended.

branch at : #[ YOUR_BRANCH_NAME ]#

Future work

Though it's easy enough, there is some posible plan depending how it's used.

  • Custom commit message template
  • A way to avoid appending for some commit
  • A way that you can re-init the "branch message amending script"

Known issue

This solution MIGHT not work in PC, as it's not fully tested.

The following env is used in for some projects :

  • Mac iTerm/Console
  • Mac SourceTree

However, Enjoy. ;)

branch-msg's People

Contributors

jspopisno1 avatar

Stargazers

 avatar  avatar

Watchers

 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.