Skip to content

Instantly share code, notes, and snippets.

@vierbergenlars
Last active January 3, 2017 13:14
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vierbergenlars/5191906 to your computer and use it in GitHub Desktop.
Save vierbergenlars/5191906 to your computer and use it in GitHub Desktop.
Recursively fix the PHP coding style on all commits in a repository
# Run these commands and the repo will be back in sync
# Note: tags are lost, because the commits are rewritten
sudo curl http://cs.sensiolabs.org/get/php-cs-fixer.phar -o /usr/local/bin/php-cs-fixer
sudo chmod a+x /usr/local/bin/php-cs-fixer
git filter-branch --tree-filter "php-cs-fixer fix .>/dev/null" --all
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment