From 424519e72229d4e6288a77992b7cebddbc937f9e Mon Sep 17 00:00:00 2001 From: Dmitry Voronin Date: Thu, 15 Feb 2024 17:52:26 +0300 Subject: [PATCH] Git : Add gv to get version number based on commit count. --- .config/bash/module/Git.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.config/bash/module/Git.sh b/.config/bash/module/Git.sh index dbff9bb..096c8ad 100644 --- a/.config/bash/module/Git.sh +++ b/.config/bash/module/Git.sh @@ -167,6 +167,11 @@ function gdc() { git diff "${1}^!" } +# Get version number based on commit count. +function gv() { + git rev-list HEAD --count +} + # Show current branch. function _git_current_branch() { git branch --show-current 2> /dev/null