Skip to content

Instantly share code, notes, and snippets.

@rscata
rscata / git-open.sh
Created April 17, 2018 07:04 — forked from amjith/git-open.sh
git-open.sh
#!/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