Last active
February 17, 2025 17:03
-
-
Save koddsson/daf81109cded9939d24e to your computer and use it in GitHub Desktop.
Runs a `post-push` hook after a successful run of `git push`
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
git() { | |
ROOT="$(/usr/bin/git rev-parse --show-toplevel)" | |
LOCATION="/.git/hooks/post-push" | |
if [ "$1" == "push" ] && [ -f "$ROOT$LOCATION" ]; then | |
/usr/bin/git $* && eval $ROOT$LOCATION | |
else | |
/usr/bin/git $* | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment