summaryrefslogtreecommitdiff
path: root/_pastebins/2022-07-14-git-cleanup-command.md
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2024-11-18 08:21:58 -0300
committerEuAndreh <eu@euandre.org>2024-11-18 08:44:57 -0300
commit960e4410f76801356ebd42801c914b2910a302a7 (patch)
tree615d379416f72956d0c1666c63ce062859041fbe /_pastebins/2022-07-14-git-cleanup-command.md
parentRemove jekyll infrastructure setup (diff)
downloadeuandre.org-960e4410f76801356ebd42801c914b2910a302a7.tar.gz
euandre.org-960e4410f76801356ebd42801c914b2910a302a7.tar.xz
v0 migration to mkwb
Diffstat (limited to '_pastebins/2022-07-14-git-cleanup-command.md')
-rw-r--r--_pastebins/2022-07-14-git-cleanup-command.md70
1 files changed, 0 insertions, 70 deletions
diff --git a/_pastebins/2022-07-14-git-cleanup-command.md b/_pastebins/2022-07-14-git-cleanup-command.md
deleted file mode 100644
index 52cd17f..0000000
--- a/_pastebins/2022-07-14-git-cleanup-command.md
+++ /dev/null
@@ -1,70 +0,0 @@
----
-
-title: git-cleanup command
-
-date: 2022-07-14
-
-layout: post
-
-lang: en
-
-ref: git-cleanup-command
-
----
-
-```
-#!/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
-```