Skip to content

Instantly share code, notes, and snippets.

Roberto Robson betorobson

Block or report user

Report or block betorobson

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
betorobson / post-checkout
Last active Jul 1, 2019 — forked from sindresorhus/post-merge
git hook to run a command after `git pull` and `git checkout` if a specified file was change for example, package.json or bower.json
View post-checkout
#!/usr/bin/env bash
# fork from
changed_files="$(git diff-tree -r --name-only --no-commit-id $1 $2)"
check_run() {
echo "$changed_files" | grep --quiet "$1" && eval "$2"
check_run package.json "npm prune && npm install"
You can’t perform that action at this time.