mirror of
https://github.com/tj/git-extras.git
synced 2026-09-10 07:26:17 -04:00
Added git-delete-branch
This commit is contained in:
parent
74bb2bc52d
commit
4dc99404ac
2
Makefile
2
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
|
||||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/env sh
|
||||
#!/bin/sh
|
||||
|
||||
CHANGELOG=`ls | egrep 'change|history' -i`
|
||||
DATE=`date +'%Y-%m-%d'`
|
||||
|
|
|
|||
|
|
@ -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
5
bin/git-delete-branch
Executable file
|
|
@ -0,0 +1,5 @@
|
|||
#!/bin/sh
|
||||
|
||||
test -z $1 && echo "branch required." && exit 1
|
||||
git branch -D $1
|
||||
git push origin :$1
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/env sh
|
||||
#!/bin/sh
|
||||
|
||||
if test $# -eq 0; then
|
||||
echo "arguments required" && exit 1
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/env sh
|
||||
#!/bin/sh
|
||||
|
||||
if test $# -gt 0; then
|
||||
echo "... releasing $1"
|
||||
|
|
|
|||
Loading…
Reference in a new issue