Skip to content

Instantly share code, notes, and snippets.

View maksymgendin's full-sized avatar

Maksym Gendin maksymgendin

View GitHub Profile

Keybase proof

I hereby claim:

  • I am maksymgendin on github.
  • I am maksymgendin (https://keybase.io/maksymgendin) on keybase.
  • I have a public key whose fingerprint is D7F7 8737 0D54 C899 8088 BB59 8DC7 8EAF EC5F 6EB2

To claim this, I am signing this object:

@maksymgendin
maksymgendin / git-delete-local-gone-remote-branches.sh
Created March 30, 2021 09:21
Usage: ./git-delete-local-gone-remote-branches.sh ~/IdeaProjects
#!/bin/bash
for directory in $(find $@ -maxdepth 1 -type d -exec readlink -f {} \;)
do
cd $directory
if [ -d .git ]; then
repository=$(basename $directory)
echo "Found git repository $repository, pulling it and searching for gone remote branches"
found=false
git fetch -p &> /dev/null && \