Skip to content

Instantly share code, notes, and snippets.

View rkpinheiro's full-sized avatar
🚀
Coding

Rurik Pinheiro rkpinheiro

🚀
Coding
View GitHub Profile
@mlorant
mlorant / git-pre-commit-hook-django
Created March 26, 2015 09:17
Django - Avoid duplicate in migration names before committing changes in Git
#!/usr/bin/python
"""
Pre-commit hook for git written in Python.
Check if there is any migration number used more than one in each
migrations folder of South or Django >= 1.7.
You can install this pre-hook by executing the command:
ln -s ./git-pre-commit-hook .git/hooks/pre-commit
chmod +x .git/hooks/pre-commit