Last active
August 29, 2015 14:09
-
-
Save davidmoten/e661537a91fee662d52a to your computer and use it in GitHub Desktop.
git commands
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
# shows uncommitted files and unpushed commits | |
function gits { | |
set -e | |
git status -s | |
CURRENT_BRANCH=`git rev-parse --abbrev-ref HEAD` | |
UNPUSHED=`git log origin/$CURRENT_BRANCH..$CURRENT_BRANCH` | |
if [ -z $UNPUSHED ]; then | |
echo Unpushed: | |
echo $UNPUSHED | |
fi | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment