We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eced436 commit f0f7b9cCopy full SHA for f0f7b9c
git-prune-branches
@@ -9,6 +9,10 @@
9
#
10
# Then it prunes all branches that no longer exist at each upstream
11
# remote.
12
+#
13
+# Author: Michael Demmer https://github.com/demmer
14
+# License: MIT
15
+# Original source: https://github.com/jut-io/git-scripts/blob/master/bin/git-prune-branches
16
17
merged=`git branch --no-color --merged master | grep -v master | sed 's/\*/ /'`
18
@@ -38,12 +42,12 @@ if [ ! -z "$merged" ] ; then
38
42
fi
39
43
done
40
44
41
-
45
+
46
remotes=`git remote`
47
for remote in $remotes ; do
48
prompt=n
49
read -p "Prune deleted branches from remote '$remote' (y=yes n=no)? " prompt
50
if [ "$prompt" = 'y' ] ; then
51
git remote prune $remote
52
-done
53
+done
0 commit comments