git-routines
git-routines copied to clipboard
Get commit message based on current pivotal story
At bitcrowd we construct the commit message based on the pivotal story. And I need to enter that in the time tracking and other stuff, too. Would be awesome if the system could give that to me with a simple command line call. E.g. git commit-message
or something like that.
Like [4711] changed everything
?
So git commit-message
would just call git commit -m "[…] …"
, adding any option like git commit-message -a
would by-pass them to the original commit as git commit -m "[…] …" -a
.
Alternative: At least on OS X, the commit message could be copied to the clipboard right after git start
.
I’m also thinking about having something like a Gitfile
, which works just as any plugin. So you could add:
after_start do
IO.popen('pbcopy', 'w') do |f|
f << "[#{@story.id}] #{@story.name}"
end
end
I am not sure about the Gitfile
thing, but the first idea sounds good to me!
:+1: