Add a command to clean git repos
This commit is contained in:
parent
b6e73b9eca
commit
8833a22f6f
|
@ -110,4 +110,11 @@
|
|||
};
|
||||
# raw files
|
||||
home.file.".config/git/hooks".source = ./hooks;
|
||||
home.shellAliases = {
|
||||
git-clean = ''
|
||||
git fetch --all -p;
|
||||
git branch --merged origin/master | grep -v "\*" | xargs git branch -d;
|
||||
git branch -vv | grep -v '\[origin/'| grep -v "\*" | awk '{ print $1; }' | xargs -r git branh -D;
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue