Skip to content

Instantly share code, notes, and snippets.

@petrikoz
Last active December 12, 2017 10:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save petrikoz/a260a3496370d3f90cef to your computer and use it in GitHub Desktop.
Save petrikoz/a260a3496370d3f90cef to your computer and use it in GitHub Desktop.
Git's hook
#!/usr/bin/env sh
# Put this file in 'project/src/.git/hooks' folder
# Change author in Python's source code
my_credits='My Name (my.email@example.com)'
company_credits='Company (info@example.com)'
find . -type f -iname '*.py' -exec sed -i -e "s/$my_credits/$company_credits/g" {} +
# Sort Python's imports in source code
find . -type f -iname '*.py' -exec isort {} +
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment