diff --git a/.config/git/config b/.config/git/config new file mode 100644 index 0000000..5feefad --- /dev/null +++ b/.config/git/config @@ -0,0 +1,10 @@ +[user] + name = Przemysław Grondek +[alias] + unadd = reset +[help] + autocorrect = 1 +[remotes] + prune = true +[pull] + rebase = true diff --git a/bin/git-purge b/bin/git-purge new file mode 100755 index 0000000..6ebacbe --- /dev/null +++ b/bin/git-purge @@ -0,0 +1,9 @@ +#!/usr/bin/env sh + +BRANCHES=$(git branch --merged|egrep -v "(^\*|master|dev)") + +if [ -z "${BRANCHES}" ] ; then + echo "Nothing to delete" +else + git branch -d ${BRANCHES} +fi