Ledger Nano X - The secure hardware wallet
SHARE
TWEET

Untitled

a guest Apr 7th, 2020 197 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. date="2020-01-01T01:00:00"
  2. DRY_RUN=1
  3. branches=
  4.  
  5. for branch in $(git branch -a | sed 's/^\s*//' | sed 's/^remotes\///' | grep -v 'master$'); do
  6.   if [[ "$(git log --since=$date $branch | wc -l)" -eq 0 ]]; then
  7.     if [[ "$branch" =~ "origin/" ]]; then
  8.       if [[ -z $branches ]]; then
  9.         branches=$(echo "$branch" | sed 's/^origin\///')
  10.       else
  11.         branches="$branches "$(echo "$branch" | sed 's/^origin\///')
  12.       fi
  13.     fi
  14.   fi
  15. done
  16. if [[ ! -z $branches ]]; then
  17.   if [[ "$DRY_RUN" -eq 1 ]]; then
  18.     echo git branch -D $branches
  19.     echo git push --delete origin $branches
  20.   else
  21.     git branch -D $branches
  22.     git push --delete origin $branches
  23.    
  24.     # clean up locally
  25.     git remote prune origin
  26.   fi
  27. fi
  28. Echo "End"
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top