Skip to content

Instantly share code, notes, and snippets.

@tmasjc
Last active January 26, 2018 06:02
Show Gist options
  • Save tmasjc/411ac8b0d99250de6c4461097909c583 to your computer and use it in GitHub Desktop.
Save tmasjc/411ac8b0d99250de6c4461097909c583 to your computer and use it in GitHub Desktop.
Common git commands put into a script to give an repo overview. #git #bash
#!/bin/bash
# Header
echo `date`
if [ -d .git ];then
echo -e "\n\033[0;42m **** Current Status ****\033[0m\n"
git status -s
echo -e "\n\033[0;43m **** Pending Issue ****\033[0m\n"
hub issue 2>/dev/null
echo -e "\n\033[0;44m **** Last Commit **** \033[0m\n"
git log -1 HEAD 2>/dev/null
echo -e "\n"
else
echo "Error: Not a git repository."
fi;
## Add path to launch anywhere ##
# export PATH=$PATH:/path/to/script
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment