Last active
January 26, 2018 06:02
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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