Skip to content

Instantly share code, notes, and snippets.

@akfernun
Last active June 15, 2017 15:55
Show Gist options
  • Select an option

  • Save akfernun/942f40fbe1fad71d06ec67d7eeaae829 to your computer and use it in GitHub Desktop.

Select an option

Save akfernun/942f40fbe1fad71d06ec67d7eeaae829 to your computer and use it in GitHub Desktop.
#!/bin/sh
cat << message >> ~/.gitmessage
###SUBJECT SHOULD BE <50 CHARS###################
subject line:
###SUBJECT SHOULD BE <50 CHARS###################
###DESCRIPTION SHOULD BE <72 CHARS PER LINE############################
## Source
[Link to the Pivotal Tracker story or Zendesk ticket](http://...)
## Problem
Detailed description of the problem or task.
## Solution
Detailed description of the solution.
## Testing
1. Login as [insert user role]
2. Perform actions
3. Behavior to verify
###DESCRIPTION SHOULD BE <72 CHARS PER LINE############################
message
echo "[commit]" >> ~/.gitconfig
echo " template=~/.gitmessage" >> ~/.gitconfig
@J3RN
Copy link

J3RN commented Jun 15, 2017

Since all lines in a git commit that begin with # are ignored, may I suggest the alternate Markdown header syntax for "Source," "Problem," etc? It would look something like this:

Source
------

[Link to the Pivotal Tracker story or Zendesk ticket](http://...)

Problem
-------

Detailed description of the problem or task.

And render like this:

Source

Link to the Pivotal Tracker story or Zendesk ticket

Problem

Detailed description of the problem or task.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment