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/bash | |
# Looks for changes and automates running bundle and other tasks. | |
# Does not run if your local branch is behind the remote. | |
# https://gist.github.com/stefansundin/82051ad2c8565999b914 | |
# post-checkout hook - looks for changes, | |
# when you change branches, and if found, reinstalls the given packages every | |
# Exit early if this was only a file checkout, not a branch change ($3 == 1) | |
[[ $3 == 0 ]] && exit 0 |
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 | |
# Automatically adds branch name to the end of every commit message. | |
NAME=$(git branch | grep '*' | sed 's/* //') | |
echo "$NAME" "$(cat "$1")" > "$1" |