Created
June 21, 2017 22:11
-
-
Save c0bra/8f631ba440f021def5bd0d803713ecc7 to your computer and use it in GitHub Desktop.
pre-commit hook to update and stage some files
This file contains 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 | |
# Stash unstaged changes | |
git stash -q --keep-index | |
npm run build | |
npm run toc | |
# Stage changes | |
git add -u | |
# Re-apply original unstaged changes | |
git stash pop -q |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment