Git-commit-with-branch is a project mainly written in Ruby, it's free.
git command line option to add your current branch to your commit message automatically
Git command line utility to automatically add your current branch name to your commit message.
Use the install script to copy the command into your /usr/local/bin directory.
ruby install.rb
This command takes the same arguments as the normal git commit
command. Run the following:
git commit-with-branch -m "Message"
This will commit anything currently added to your index with the message: [MASTER] Message
.
At the moment this only works with messages passed with the -m flag. If you don't pass a message with the -m flag to the commit-with-branch command, you will receive an error.