From 891625366a636a68404ed4089fa0b792538cf5f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Thu, 9 Feb 2023 11:24:49 +0200 Subject: Docs: example fixes (#433) * Use same placeholder `rev` comment for both pre-commit examples * Fix `--commits` special references example --- docs/index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/index.md b/docs/index.md index b79f8d6..b735b6b 100644 --- a/docs/index.md +++ b/docs/index.md @@ -272,7 +272,7 @@ If you want to lint more commits you can modify the `gitlint-ci` hook like so: ```yaml - repo: https://github.com/jorisroovers/gitlint - rev: v0.17.0 + rev: # insert ref, e.g. v0.18.0 hooks: - id: gitlint - id: gitlint-ci @@ -318,7 +318,7 @@ gitlint --commits mybranch # Lint all commits that are different between a branch and your main branch gitlint --commits "main..mybranch" # Use git's special references -gitlint --commits "origin..HEAD" +gitlint --commits "origin/main..HEAD" # You can also pass multiple, comma separated commit hashes: gitlint --commits 019cf40,c50eb150,d6bc75a -- cgit v1.2.3