-
-
Save rscata/3d1972f30e90b9c9a496b52d96e3a022 to your computer and use it in GitHub Desktop.
git-open.sh
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 | |
dirty=`git status --porcelain -uno | sed s/^...//` | |
last_modified=`git show --pretty="format:" --name-only HEAD` | |
if [ -n "$dirty" ]; then | |
echo $dirty | |
else | |
echo $last_modified | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment