From 1e4d09af82028be47103e9be6ffea5925cc0de3b Mon Sep 17 00:00:00 2001 From: Dmitry Voronin Date: Mon, 18 Nov 2024 19:51:35 +0300 Subject: [PATCH] Git: Add gct, gcf and rework gcl. --- home/program/bash/module/Git.nix | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/home/program/bash/module/Git.nix b/home/program/bash/module/Git.nix index 3f8d77d..6226772 100644 --- a/home/program/bash/module/Git.nix +++ b/home/program/bash/module/Git.nix @@ -61,9 +61,19 @@ git commit -m "''${@}" } - # Git clone (lazy!). + # Git clone with tree filter. + function gct() { + git clone --filter tree:0 ''${@} + } + + # Git clone full repo. + function gcf() { + git clone ''${@} + } + + # Git clone latest commit only. function gcl() { - git clone --filter tree:0 "''${@}" + git clone --depth=1 --single-branch ''${@} } # Git signed commit.