From caeae2ace22749d404bc3a5e0395095af168f449 Mon Sep 17 00:00:00 2001 From: Dmitry Voronin Date: Fri, 18 Oct 2024 14:44:50 +0300 Subject: [PATCH] Git: Add grs. --- home/program/bash/module/Git.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/home/program/bash/module/Git.nix b/home/program/bash/module/Git.nix index 0e3de69..0151f1e 100644 --- a/home/program/bash/module/Git.nix +++ b/home/program/bash/module/Git.nix @@ -126,6 +126,12 @@ git apply --index "''${@}" } + # Unstage changes. + # Usage: grs + function grs() { + git restore --staged "''${@}" + } + # Run git garbage collection. function ggc() { git gc --aggressive --no-cruft --prune=now