Skip to content

Instantly share code, notes, and snippets.

View victor-gesit's full-sized avatar

Victor Idongesit victor-gesit

View GitHub Profile
@samsonjs
samsonjs / pre-commit.sh
Last active November 5, 2021 11:50
[iOS] git pre-commit hook to catch misplaced views in xibs and storyboards, and focused or disabled tests and specs
#!/usr/bin/env bash
#
# Based on http://merowing.info/2016/08/setting-up-pre-commit-hook-for-ios/
set -eu
diff-index() {
git diff-index -p -M --cached HEAD -- "$@"
}