Add git hide and git unhide scripts.

This commit is contained in:
Tom Alexander 2026-02-14 12:31:47 -05:00
parent 1211bc1c44
commit b1b2ea2109
Signed by: talexander
GPG Key ID: 36C99E8B3C39D85F

View File

@ -16,6 +16,14 @@ let
}:$PATH"
exec ${package}/bin/${prog} "''${@}"
'';
git_hide = pkgs.writeShellScriptBin "git-hide" ''
git add --intent-to-add "''${@}"
git update-index --skip-worktree --assume-unchange "''${@}"
'';
git_unhide = pkgs.writeShellScriptBin "git-unhide" ''
git update-index --no-skip-worktree --no-assume-unchange "''${@}"
git reset "''${@}"
'';
in
{
imports = [ ];
@ -41,6 +49,8 @@ in
{
environment.systemPackages = with pkgs; [
my_git
git_hide
git_unhide
];
}
(lib.mkIf (config.me.git.config != null) {