Advertisement
pjerky

File: gdb (short for git delete branch)

Oct 27th, 2016
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.27 KB | None | 0 0
  1. #!/usr/bin/env bash
  2.  
  3. BRANCH=$1
  4.  
  5. if [[ -z "$BRANCH" ]]; then
  6.   read -p "Branch to delete: " BRANCH
  7. fi
  8.  
  9. echo "Deleting GIT branch: ${BRANCH} both locally and remotely..."
  10.  
  11. git po --delete ${BRANCH}
  12. git branch -d ${BRANCH}
  13.  
  14. echo "Done deleting branch: ${BRANCH}!"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement