You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here's the sequence to re-initialize pre-commit after removing .git:
# 1. Remove old git and hooks
rm -rf .git
rm -rf .pre-commit-config.yaml.bak
# 2. Uninstall pre-commit hooks (in case any are lingering)
pre-commit uninstall
# 3. Initialize new git repository
git init
git checkout -b develop
# 4. Re-install pre-commit hooks
pre-commit install
pre-commit install --hook-type commit-msg
# 5. Run pre-commit autoupdate to get latest versions
pre-commit autoupdate
# 6. Test pre-commits on all files
pre-commit run --all-files
If you get any errors during the pre-commit installation, you can try: