dotfiles/modules/shell/git.nix

44 lines
1.1 KiB
Nix
Raw Normal View History

2022-04-29 00:54:37 +00:00
{ config, pkgs, fullName, ... }: {
2022-04-28 23:20:46 +00:00
programs.git = {
enable = true;
2022-04-29 00:54:37 +00:00
userName = fullName;
2022-04-28 23:20:46 +00:00
userEmail = "7386960+nmasur@users.noreply.github.com";
extraConfig = {
pager = { branch = "false"; };
2022-04-29 00:54:37 +00:00
safe = { directory = builtins.toString ../../.; };
2022-04-28 23:20:46 +00:00
};
};
programs.fish.shellAbbrs = {
g = "git";
gs = "git status";
gd = "git diff";
gds = "git diff --staged";
gdp = "git diff HEAD^";
ga = "git add";
gaa = "git add -A";
gac = "git commit -am";
gc = "git commit -m";
gca = "git commit --amend --no-edit";
gcae = "git commit --amend";
gu = "git pull";
gp = "git push";
gpp = "git_set_upstream";
gl = "git log --graph --decorate --oneline -20";
gll = "git log --graph --decorate --oneline";
gco = "git checkout";
gcom = "git switch master";
gcob = "git switch -c";
gb = "git branch";
gbd = "git branch -d";
gbD = "git branch -D";
gr = "git reset";
grh = "git reset --hard";
gm = "git merge";
gcp = "git cherry-pick";
cdg = "cd (git rev-parse --show-toplevel)";
};
}