git: add clean-deleted-remotes command
This commit is contained in:
parent
b6fd1a25b3
commit
fad066b258
|
@ -125,6 +125,12 @@
|
||||||
zbar
|
zbar
|
||||||
wl-clipboard
|
wl-clipboard
|
||||||
];
|
];
|
||||||
|
git_clean_remote_deleted = [
|
||||||
|
git
|
||||||
|
gnugrep
|
||||||
|
gawk
|
||||||
|
findutils
|
||||||
|
];
|
||||||
pint-fmt = [ ];
|
pint-fmt = [ ];
|
||||||
powerplay-led-idle = [
|
powerplay-led-idle = [
|
||||||
bash
|
bash
|
||||||
|
|
6
scripts/git_clean_remote_deleted
Executable file
6
scripts/git_clean_remote_deleted
Executable file
|
@ -0,0 +1,6 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
git branch -vv \
|
||||||
|
| grep ': gone]' \
|
||||||
|
| awk '{print $1}' \
|
||||||
|
| xargs git branch -D
|
|
@ -36,8 +36,13 @@ in
|
||||||
alias = {
|
alias = {
|
||||||
graph = "log --graph --oneline --branches";
|
graph = "log --graph --oneline --branches";
|
||||||
root = "rev-parse --show-toplevel";
|
root = "rev-parse --show-toplevel";
|
||||||
|
clean-deleted-remotes = "!" + (lib.getExe pkgs.git_clean_remote_deleted);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
git_clean_remote_deleted
|
||||||
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue