This page documents common contributor workflows: pre-commit, Commitizen.
Run hooks manually when needed:
Terminal (pwsh / bash):
# Run all pre-commit hooks against all files
pre-commit run --all-files
# Run all pre-commit hooks against all files, as they would run on pre-push
pre-commit run --all-files --hook-stage pre-pushUse cz commit to create standardized commit messages. The commit-msg
pre-commit hook validates the format.
Terminal (pwsh / bash):
# Run instead of git commit to create a standardized commit message
cz commit
# Alternative: Create and preview the commit message without creating a commit
cz commit --dry-runSince the original repository is on a self-hosted GitLab instance, to publish updates to GitHub, there are several steps necessary:
Terminal (pwsh / bash):
# 1. Create and switch to a new branch (branch name: main-github) for the release:
git checkout -b main-github
# 2. Filter the Repository using `git-filter-repo` (removing all files in 'private' folders)
git filter-repo --path-glob '*/private/*' --invert-paths --force
# 3. Add the github repository as a remote (remote name:origin-github)
git remote add origin-github https://github.com/erc-fhv/open-ev-fleet.git
# 4. Push the changes to GitHub (local: main-github to remote origin-github:main)
git push origin-github main-github:main
# 5. Switch back to the main branch
git checkout main
# 6. Delete the temporary branch
git branch -D main-githubHint:
git-filter-repois available from in the-devdependency group managed by UV of the project, via the project's.venv.- To use
git-filter-repowithout setting up the project's.venvyou can install it viauv tool install git-filter-repo.