0

This has been asked several times before, but I don't see any satisfactory answers. I am looking for a way to:

  • Find all git repositories in the home directory
  • For each repository display branches that are behind the remote
  • Branches that do not have any remote counterparts
  • Repositories that don't have any remotes
  • Any uncommitted changes

There are pieces of that do some of these tasks, but I don't see anything that is comprehensive. I am about to start a github project that will do this, but I want to find out if there is an existing tool that does all of the above.

Vlad
  • 9,180
  • 5
  • 48
  • 67
  • I'm writing scripts to extract data out of Git (none of the above, mind you) and find that running `git` commands via `exec` in PHP is more than enough. I use Git to help with formatting where it can (`git log --oneline` for example) and then ordinary string manipulation to parse the output. – halfer May 13 '14 at 23:56

1 Answers1

0

This has worked for me for 2 years

for rp in ~/*/
do
  printf '\ec'
  cd "$rp"
  git status
  echo "${rp%/}"
  read
done

git: Find all uncommited locals repos in a directory tree

Example

Community
  • 1
  • 1
Zombo
  • 1
  • 62
  • 391
  • 407