Skip to content

Instantly share code, notes, and snippets.

@zeroeth
Created March 23, 2014 21:57
Show Gist options
  • Select an option

  • Save zeroeth/9730513 to your computer and use it in GitHub Desktop.

Select an option

Save zeroeth/9730513 to your computer and use it in GitHub Desktop.
find all git repos in a folder
#!/bin/bash
# Doesn't work with white-spaced names.
# find . -type d -name .git | xargs -n 1 dirname
# Works with white-space.
find . -type d -name .git -print0 | xargs -0 -n 1 dirname
# TODO fetch all remotes and then list branch sync info similar to https://gist.github.com/zeroeth/8013177
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment