Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
  • Loading branch information
unixorn committed Sep 23, 2017
commit 46989c5bac2273b167848b10e9fda419ad7cdd6c
11 changes: 11 additions & 0 deletions bin/git-diff-last
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/sh
#
# original source: https://github.com/sschuberth/dev-scripts/blob/master/git/git-diff-last.sh

if [ $# -ne 1 ]; then
echo "Rationale : Show the last committed change in a given file."
echo "Usage : $(basename $0) <filename>"
exit 1
fi

git diff $(git log --pretty=oneline -1 $1 | cut -b 1-40)^ $1