Added function to delete a git branch from local, cached remote and remote server
This commit is contained in:
@@ -103,7 +103,7 @@ git_submodule_rm() {
|
|||||||
# i.e. swap origin <-> username
|
# i.e. swap origin <-> username
|
||||||
git_swap_remotes() {
|
git_swap_remotes() {
|
||||||
if [ -z "$2" ]; then
|
if [ -z "$2" ]; then
|
||||||
echo "Usage: $0 remote1 remote2"
|
echo "Usage: git_swap_remotes remote1 remote2"
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
git remote rename "$1" "$1_temp"
|
git remote rename "$1" "$1_temp"
|
||||||
@@ -117,6 +117,18 @@ if [ "$shell" = "bash" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# Delete a git branch from local, cached remote and remote server
|
||||||
|
git_branch_delete_all() {
|
||||||
|
if [ -z "$1" ]; then
|
||||||
|
echo "Usage: git_branch_delete_all branch"
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
git branch -D $1
|
||||||
|
git branch -D -r origin/$1
|
||||||
|
git push origin :$1
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
# Updates cached Travis CI status if repo contains .travis.yml
|
# Updates cached Travis CI status if repo contains .travis.yml
|
||||||
#
|
#
|
||||||
# Creates and excludes .travis_status~
|
# Creates and excludes .travis_status~
|
||||||
|
|||||||
Reference in New Issue
Block a user