Skip to content

Instantly share code, notes, and snippets.

@jehna
Last active March 10, 2016 22:25
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 jehna/53b67dc53bfe1e3e010f to your computer and use it in GitHub Desktop.
Save jehna/53b67dc53bfe1e3e010f to your computer and use it in GitHub Desktop.
Check which directories have GIT repository and at least one remote in them
ls -d */ | xargs -I {} echo "echo -n "{} ... "; cd \"{}\"; test -d .git && (git remote | head -n 1 | grep . || echo NO REMOTE) || echo NO GIT; cd ..;" | bash
@jehna
Copy link
Author

jehna commented Mar 10, 2016

And you can add | grep NO | less to see a quick glance of directories that you should add to git

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