Added git-delete-branch

This commit is contained in:
Tj Holowaychuk 2010-08-10 21:13:59 -07:00
parent 74bb2bc52d
commit 4dc99404ac
7 changed files with 17 additions and 4 deletions

View file

@ -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

View file

@ -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

View file

@ -1,4 +1,4 @@
#!/usr/bin/env sh
#!/bin/sh
CHANGELOG=`ls | egrep 'change|history' -i`
DATE=`date +'%Y-%m-%d'`

View file

@ -1,4 +1,4 @@
#!/usr/bin/env sh
#!/bin/sh
arg=$1; shift
if test "$arg" = "--all"; then

5
bin/git-delete-branch Executable file
View file

@ -0,0 +1,5 @@
#!/bin/sh
test -z $1 && echo "branch required." && exit 1
git branch -D $1
git push origin :$1

View file

@ -1,4 +1,4 @@
#!/usr/bin/env sh
#!/bin/sh
if test $# -eq 0; then
echo "arguments required" && exit 1

View file

@ -1,4 +1,4 @@
#!/usr/bin/env sh
#!/bin/sh
if test $# -gt 0; then
echo "... releasing $1"