Probably everyone pushed some code to remote branch which shouldn't be pushed. I mean such things like:
- and other cool stuff ;)
To prevent this situation, I've created a git hook for
It checks code, if current changes include keyword, you won't be able to create a commit. Example
# user.rb class User def initialize binding.pry end def create throw :create end end
When you call
git commit you get:
# Check following lines: # user.rb contains binding.pry at line 4. # user.rb contains throw at line 8.
If you want to use it, you have to copy
pre-commit file from this repo to your
.git/hooks for given repository.
You can also copy it to template directory, for instance
/usr/local/Cellar/git/1.8.2/share/git-core/templates/hooks/ or define your own template directory like here.
If you see, that something is wrong, you can report an issue on Github or send me a pull request or just leave a comment.