Skip to content

Instantly share code, notes, and snippets.

@nielswind
Last active April 19, 2023 11:10
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 nielswind/382de8fafe23168aa172cb94fa63ead6 to your computer and use it in GitHub Desktop.
Save nielswind/382de8fafe23168aa172cb94fa63ead6 to your computer and use it in GitHub Desktop.
#!/bin/bash
# list remote branches not having local branch with same name
set -euo pipefail
IFS=$'\n\t'
comm -23 <(git branch -r|cut -d"/" -f2-|sort|grep -v HEAD) <(git branch|cut -c3-|sort)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment