diff --git a/Makefile b/Makefile index c3a5485..9919387 100644 --- a/Makefile +++ b/Makefile @@ -4,6 +4,7 @@ PREFIX = /usr/local BINS = bin/git-count \ bin/git-ignore \ bin/git-changelog \ + bin/git-delete-branch \ bin/git-release install: @@ -14,5 +15,6 @@ uninstall: rm -f $(PREFIX)/bin/git-ignore rm -f $(PREFIX)/bin/git-changelog rm -f $(PREFIX)/bin/git-release + rm -f $(PREFIX)/bin/git-delete-branch .PHONY: install uninstall \ No newline at end of file diff --git a/Readme.md b/Readme.md index 81912d4..f4ed95f 100644 --- a/Readme.md +++ b/Readme.md @@ -61,6 +61,12 @@ ... added '*.o' ... added '*.log' +## git delete-branch <name> + + Deletes local and remote branch _name_. + + $ git delete-branch integration + ## git-changelog Populates the file named matching _change|history -i_ with the commits diff --git a/bin/git-changelog b/bin/git-changelog index e1b786f..e317f62 100755 --- a/bin/git-changelog +++ b/bin/git-changelog @@ -1,4 +1,4 @@ -#!/usr/bin/env sh +#!/bin/sh CHANGELOG=`ls | egrep 'change|history' -i` DATE=`date +'%Y-%m-%d'` diff --git a/bin/git-count b/bin/git-count index cad0df5..bab5da5 100755 --- a/bin/git-count +++ b/bin/git-count @@ -1,4 +1,4 @@ -#!/usr/bin/env sh +#!/bin/sh arg=$1; shift if test "$arg" = "--all"; then diff --git a/bin/git-delete-branch b/bin/git-delete-branch new file mode 100755 index 0000000..588020a --- /dev/null +++ b/bin/git-delete-branch @@ -0,0 +1,5 @@ +#!/bin/sh + +test -z $1 && echo "branch required." && exit 1 +git branch -D $1 +git push origin :$1 \ No newline at end of file diff --git a/bin/git-ignore b/bin/git-ignore index b2d6d09..7747dcb 100755 --- a/bin/git-ignore +++ b/bin/git-ignore @@ -1,4 +1,4 @@ -#!/usr/bin/env sh +#!/bin/sh if test $# -eq 0; then echo "arguments required" && exit 1 diff --git a/bin/git-release b/bin/git-release index fadd192..bcaa080 100755 --- a/bin/git-release +++ b/bin/git-release @@ -1,4 +1,4 @@ -#!/usr/bin/env sh +#!/bin/sh if test $# -gt 0; then echo "... releasing $1"