From ae8d901b9feaa0df7a14eafe0752812b356d689b Mon Sep 17 00:00:00 2001 From: OrekiWoof Date: Sun, 31 May 2026 03:30:21 +0200 Subject: [PATCH] add printLatestCommits.sh --- printLatestCommits.sh | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100755 printLatestCommits.sh diff --git a/printLatestCommits.sh b/printLatestCommits.sh new file mode 100755 index 0000000..25a7b61 --- /dev/null +++ b/printLatestCommits.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash + +script_dir="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)" +count="${1:-10}" + +git -C "$script_dir" log -n "$count" --pretty=format:%s | awk '{ lines[NR] = $0 } END { for (i = NR; i >= 1; i--) print lines[i] }'