-
-
Save MJGTwo/7338a652eeeaa7fc6ce7682a1453f39c to your computer and use it in GitHub Desktop.
A more robust "git status" script I found years ago and keep at `/usr/local/bin/g`. `chmod +x` it and you're good to go.
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 | |
if [[ $(($RANDOM % 5)) = 0 ]] | |
then git fetch; clear; echo "Fetched"; | |
else | |
clear; | |
fi | |
echo 'Branches:' | |
git branch; | |
echo '' | |
echo 'Last 5 log entries:'; | |
git --no-pager log --oneline -n 5 | |
echo '' | |
echo 'Stashes:'; | |
git stash list; | |
echo '' | |
echo 'Status:'; | |
git status; | |
# git notes | |
# | |
# Add a second remote machine (workstation) | |
# git remote add enterprise ssh://enterprise/code/infinum/iSpace/avisoAll | |
# git fetch | |
# git remote -v | |
# git checkout enterprise/branch_name |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment