summaryrefslogtreecommitdiff
path: root/src/content/pastebins/2022
diff options
context:
space:
mode:
Diffstat (limited to 'src/content/pastebins/2022')
-rw-r--r--src/content/pastebins/2022/07/14/git-cleanup.adoc59
1 files changed, 0 insertions, 59 deletions
diff --git a/src/content/pastebins/2022/07/14/git-cleanup.adoc b/src/content/pastebins/2022/07/14/git-cleanup.adoc
deleted file mode 100644
index b223f86..0000000
--- a/src/content/pastebins/2022/07/14/git-cleanup.adoc
+++ /dev/null
@@ -1,59 +0,0 @@
-= git-cleanup command
-
-[source,sh]
-----
-#!/bin/sh
-set -eu
-
-usage() {
- cat <<-'EOF'
- Usage:
- git cleanup
- git cleanup -h
- EOF
-}
-
-help() {
- cat <<-'EOF'
-
- Options:
- -h, --help show this message
- EOF
-}
-
-for flag in "$@"; do
- case "$flag" in
- --)
- break
- ;;
- --help)
- usage
- help
- exit
- ;;
- *)
- ;;
- esac
-done
-
-while getopts 'h' flag; do
- case "$flag" in
- h)
- usage
- help
- exit
- ;;
- *)
- usage >&2
- exit 2
- ;;
- esac
-done
-shift $((OPTIND - 1))
-
-
-
-git branch --merged |
- grep -v -e '^\*' -e '^. main$' |
- xargs git branch -d
-----