From b11cf3b2bcdbe4a195251b53715ce4c0c18a8c7a Mon Sep 17 00:00:00 2001 From: Dmitry Voronin Date: Thu, 9 Jan 2025 10:20:48 +0300 Subject: [PATCH] Git: Add gaa to add even ignored files. --- home/program/bash/module/Git.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/home/program/bash/module/Git.sh b/home/program/bash/module/Git.sh index 279c040..e51502a 100644 --- a/home/program/bash/module/Git.sh +++ b/home/program/bash/module/Git.sh @@ -179,6 +179,16 @@ function ga() { git add ${target} } +# Preview diff while adding. Adds even ignored files. +# Usage: gaa [FILES] +function gaa() { + local target=${@} + [[ ${target} == "" ]] && target="." + + git diff ${target} + git add -f ${target} +} + # Rebase by X commits or from root. When COUNT is 0 - rebase from root. Default is 2. # Usage: gr [COMMIT COUNT] function gr() {