Skip to content

Instantly share code, notes, and snippets.

@usmanakram232
Last active January 9, 2020 13:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save usmanakram232/3203e171ff479ff15dd16d41173b46c8 to your computer and use it in GitHub Desktop.
Save usmanakram232/3203e171ff479ff15dd16d41173b46c8 to your computer and use it in GitHub Desktop.
kb-001: useful terminal #kb

Terminal

jobs

  1. show suspended jobs jobs
  2. stop a suspened job: kill -STOP %jobId

Git

Remove remote merged branches

git fetch --all --prune && git branch --remote --merged | grep -v -P 'master|production$' | xargs -L1 -r git push -d; echo

Remove local branches which have been merged on origin

git fetch --all --prune && git branch --merged | grep -v "\*" | xargs -n 1 git branch -d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment