Last active
          August 29, 2015 14:00 
        
      - 
      
- 
        Save fredrikhl/90856e22dbad5dd4a31f to your computer and use it in GitHub Desktop. 
    Cerebrum commit msg hook
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | #!/bin/sh | |
| # | |
| # branch -> remove /path/to/branch | |
| tag=$( git symbolic-ref HEAD \ | |
| | awk -F'/' '{print $NF}' \ | |
| | sed 's/^[Cc][Rr][Bb]-\([0-9]\+\)/CRB-\1/' \ | |
| ) | |
| [ -n "$tag" ] && echo "$tag" >> $1 | 
Also worth noting: Remember to clear the commit message, SAVE and exit the editor to abort the commit...
I always use -m ;_;
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
            
Maybe just
echo $(git symbolic-ref HEAD) >> $1is enough for the Stash/Jira integration?