summaryrefslogtreecommitdiff
path: root/home/git/aliases.nix
blob: 0645a56e48a5055403e46d4ceca3b952cfe7bd7c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# This module defines my personal git aliases. Some of these are
# pseudo-subcommands which are easier to remember while others simply save me
# some keystrokes.
{...}: {
  programs.git.aliases = {
    unstage = "restore --staged";
    forgor = "commit --amend --no-edit --";
  };

  home.shellAliases = {
    gs = "git status";
    gd = "git diff --";
    gl = "git log --oneline";

    gc = "git commit";
    gcp = "git commit --patch";
    gf = "git forgor";

    ga = "git add --";
    gan = "git add -N";
    gap = "git add --patch";
    gu = "git unstage";
  };
}