Skip to content

Instantly share code, notes, and snippets.

@thorgeir93
thorgeir93 / git_status_recursive.sh
Last active June 10, 2020 18:32
Run git status on every git repository under the given directory. Useful to find uncommitted files on your server.
#!/bin/bash
# Run git status on every git repository under the given directory.
# (see also: https://gist.github.com/mzabriskie/6631607)
#
# USAGE: bash git_status_recursive.sh <DIRECTORY_PATH>
#
# EXAMPLE1: bash git_status_recursive.sh /home/thorgeir
# EXAMPLE2: bash git_status_recursive.sh .
#
# DATE: Wed Jun 10 18:15:35 UTC 2020