From ab20c7de69fea7fbb65c9171c6bc319d32611034 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Mon, 20 May 2024 19:09:17 +0100 Subject: [PATCH] Consolidate Git aliases Move the `update` alias into the Git namespace, so it's now `git update`, and remove the others that I wasn't using. --- lib/shared/modules/git.nix | 2 ++ lib/shared/modules/zsh.nix | 6 ------ 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/shared/modules/git.nix b/lib/shared/modules/git.nix index 6521e8d6..a5b6ff4f 100644 --- a/lib/shared/modules/git.nix +++ b/lib/shared/modules/git.nix @@ -87,6 +87,8 @@ unassume = "update-index --no-assume-unchanged"; uncommit = "reset --soft HEAD^"; unstage = "reset"; + update = + "!git fetch --all --jobs=4 --prune --progress && git rebase --autostash --stat"; upstream = "rev-parse --abbrev-ref --symbolic-full-name @{u}"; ureset = "!git reset --hard $(git upstream)"; worktrees = "worktree list"; diff --git a/lib/shared/modules/zsh.nix b/lib/shared/modules/zsh.nix index b9210ca1..2d263194 100644 --- a/lib/shared/modules/zsh.nix +++ b/lib/shared/modules/zsh.nix @@ -196,11 +196,7 @@ ialias cat="bat" ialias cs="create-script" ialias daily="run create-daily next" - ialias fetch="git fetch --all --jobs=4 --progress --prune" ialias ls="lsd" - ialias pull="git pull --autostash --jobs=4 --summary origin" - ialias rebase="git rebase --autostash --stat" - ialias reset="git reset --hard; git clean -fd" ialias run="./run" ialias s="secrets" ialias secrets="doppler --project \"$(whoami)\" run" @@ -208,8 +204,6 @@ ialias sz="source ~/.config/zsh/.zshrc" ialias tag="tag-release" ialias uncommit="git reset --soft HEAD^"; - ialias update="fetch && rebase" - ialias wip="git add . && git commit -m 'wip'"; ialias wt="git worktree" balias lh3="xdg-open http://localhost:3000" balias lh8="xdg-open http://localhost:8000"