I implemented a git-hook to scan my commits through pyflakes and jshint, and after reading Yipit's commentary on why most pre-commit hooks are broken, I chose to implement his git stash
and git stash pop
suggestions.
Unfortunately, git stash pop
marks the files as 'modified', which then causes my IDE to warn me whenever I go back to that page " modified on disk. Reread from disk?" It then asks "Are you sure you want to edit this buffer?" and finally "Are you sure you want to save this buffer over a modified file?"
I appreciate everything it's trying to do for me, but it's asking me about functionally non-existent "changes".
Short of playing weird guessing games with touch
is there some way to prevent git stash pop
from marking all of the files it touched as changed?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…