Skip to content

Instantly share code, notes, and snippets.

@lawrencewalters
Created March 4, 2025 14:45
Show Gist options
  • Save lawrencewalters/a0cf5f3d54a76c79aa9b45db28d50d8f to your computer and use it in GitHub Desktop.
Save lawrencewalters/a0cf5f3d54a76c79aa9b45db28d50d8f to your computer and use it in GitHub Desktop.
git commands that are useful

Delete all local branches that have no remote / have been merged

git branch -vv | grep -v ']'| grep -v "\*" | awk '{ print $1; }' | xargs git branch -d

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