How to use a global git hook for all your projects

mkdir .git_template
mkdir .git_template/hooks
cd .git_template/hookstouch pre-commit
#!/bin/bashVAR=$(git diff --cached | grep -w "var_dump")
if [ ! -z "$VAR" ]; then
echo "You've left a var_dump in one of your files! Aborting commit..."
exit 1
chmod a+x .git_template/hooks/pre-commit




Software Engineer, Networking, Technology

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

[Java] Array — Valid Mountain Array #941

Zinox Driver Download For Windows 10

Zinox driver download for windows 10 32-bit

Cloud Native Best Business Practices (Part 2) — Klusters as Kattle

Commons errors working with Go-sql

What are the frameworks available in CSS

Estimating through randomness

Superb Tables 109.0 [Latest Update & Pre-Licensed]

Installing Tensorflow on Fedora 34

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store


Software Engineer, Networking, Technology

More from Medium

Setup Ruby on R

Models from JSON API response

What is Refactoring? Design Patterns? Why should you learn it today!

Polymorphism | OOP Concepts 1/4.