Created
December 11, 2014 11:14
-
-
Save toto/3cedf52626e219824068 to your computer and use it in GitHub Desktop.
Put this in .git/hooks/post-checkout, make it executable with chmod u+x .git/hooks/post-checkout. Now git will complain when you have to do pod install after witching branches. You can also symlink it to .git/hooks/post-merge so it also is run after merge/pull
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 | |
# | |
# Let's you know when your pods should be updated right after a git pull or git merge | |
# Also works for fast-forward pulls. | |
# | |
# To enable this hook for your project, save it as .git/hooks/post-checkout | |
diff "Podfile.lock" "Pods/Manifest.lock" > /dev/null | |
if [ $? != 0 ] ; then | |
echo | |
echo "[COCOAPODS] The sandbox is not in sync with the Podfile.lock." | |
echo " Run 'pod install' or update your CocoaPods installation." | |
echo | |
#pod install # uncomment this line to update the pods whenever necessary | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment