Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am lonsun on github.
  • I am lps1978 (https://keybase.io/lps1978) on keybase.
  • I have a public key ASD1op1t62w3Hs3Fs6rXNDKdYsLgk64kzDJPUYIAuxZ9Ngo

To claim this, I am signing this object:

@lonsun
lonsun / .fish
Created July 11, 2016 22:46
Fish shell script to remove local Git branches that have been merged and no longer appear on remote.
function git_clean_branches
set base_branch develop
# work from our base branch
git checkout $base_branch
# remove local tracking branches where the remote branch is gone
git fetch -p
# find all local branches that have been merged into the base branch