Skip to content

Instantly share code, notes, and snippets.

@mxdvl
Last active July 21, 2023 19:20
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 mxdvl/5bc05c6ffacedadc9f54aa4b3221b511 to your computer and use it in GitHub Desktop.
Save mxdvl/5bc05c6ffacedadc9f54aa4b3221b511 to your computer and use it in GitHub Desktop.
Useful CLI commands
function git_remove_gone_branches() {
# from https://stackoverflow.com/a/61935602/1577447, except works with squash & merge strategy.
git fetch -p
git branch -vv | grep ': gone]' | awk '{print $1}' | xargs git branch -D
}
@mxdvl
Copy link
Author

mxdvl commented Dec 9, 2021

Now moved to mxvdvl/env/git.zsh

@mxdvl
Copy link
Author

mxdvl commented Jul 21, 2023

Deno version in mxdvl/deno/scripts/git.ts

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