Skip to content

Instantly share code, notes, and snippets.

@Rawa
Last active January 17, 2020 10:07
Show Gist options
  • Save Rawa/7bbc48fba7503def124c32afefa0cbdc to your computer and use it in GitHub Desktop.
Save Rawa/7bbc48fba7503def124c32afefa0cbdc to your computer and use it in GitHub Desktop.
gsd - Git Status Directories, check status of multiple directories simultainously
#!/usr/bin/env bash
for var in "$@"
do
if [[ -d $target ]]; then
cd $target
pwd
git fetch
git status | sed -n 2p
git status --porcelain
echo ""
cd - > /dev/null
else
echo "$target is not a valid directory"
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment