We are having an issue in our team and we have decided to check if there is a way or git command to reject git push where there are TODOs in the code. Any ideas? Thanks in advance.
相关问题
- Why does recursive submodule update from github fa
- Extended message for commit via Visual Studio Code
- Emacs shell: save commit message
- Can I organize Git submodules in a flat hierarchy?
- Upload file > 25 MB on Github
相关文章
- 请教Git如何克隆本地库?
- GitHub:Enterprise post-receive hook
- Git Clone Fails: Server Certificate Verification F
- SSIS solution on GIT?
- Is there a version control system abstraction for
- ssh: Could not resolve hostname git: Name or servi
- Cannot commit changes with gitextensions
- git: retry if http request failed
Is not possible use pre-receive hooks in github, so we are using instead pre-commit hook in client side: http://git-scm.com/book/en/Customizing-Git-Git-Hooks#Client-Side-Hooks
Our pre-commit script (based on http://mark-story.com/posts/view/using-git-commit-hooks-to-prevent-stupid-mistakes) looks like:
We have this script under our control version system, and create a symbolic link to it in .git/hooks
Thanks for the help :)
EDIT: because of grep behaviour in if statement we needed to edit our script:
Pre-receive hook on the server, grep the files and abort the push :)
More info on the pre-receive hook can be found here: http://git-scm.com/book/en/Customizing-Git-Git-Hooks#Server-Side-Hooks