Last active
December 30, 2015 19:29
-
-
Save diiq/7874563 to your computer and use it in GitHub Desktop.
This file contains 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/bash | |
# This script works in tandem with git-branch-with-scope. If you | |
# branched normally, this commits as usual. It should be saved in | |
# .git/hooks/prepare-commit-msg. | |
message_file="$1" | |
current_branch=`git symbolic-ref -q --short HEAD` | |
scope_definition=".git/$current_branch-scope" | |
if [ -e $scope_definition ] | |
then | |
t_message_file=`mktemp /tmp/git-commit-with-scope-XXXXX` | |
(echo -e "\n\n"; sed -e 's/^/# /' "$scope_definition"; cat "$message_file") > "$t_message_file" | |
cat "$t_message_file" > "$message_file" | |
fi |
@ejdyksen, there was a comment in two of these scripts regarding that alias and how to create it -- but just for you, I've removed both the comments and the alias from both. :)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Getting this:
Is this an alias in your environment?
I'm running the latest git (1.8.5.1).