Hook이란? 특정 상황에 특정스크립트를 실행시키는 기능
![<https://github.com/DongjunLee/BeAwesomeToday/raw/master/images/git-hook-samples.png>](<https://github.com/DongjunLee/BeAwesomeToday/raw/master/images/git-hook-samples.png>)
#!/bin/shecho "pre-commit trigger!"echo "Wow you make a commit. Good Job!"
vim .git/hooks/pre-commit
" 위의 스크립트 복사
chmod +x .git/hooks/pre-commit
➜ git-pre-commit-hook git:(master) ✗ git commit -m "test pre-commit hook"pre-commit trigger!Wow you make a commit. Good Job![master 85393b8] test pre-commit hook1 file changed, 1 deletion(-)
flake8 --install-hook git" if want prevent commitgit config --bool flake8.strict true
https://notion-ga.astrocket.vercel.app/collect?tid=UA-170846618-2&host=notion.so&page=/engineering/Git_Hooks