Created
June 5, 2017 06:50
-
-
Save bitmess/1906665780536a4b7d042ddcc68b7b83 to your computer and use it in GitHub Desktop.
git log for one file
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/sh | |
PATH=$1 | |
if [ ! -f "$PATH" ]; | |
then | |
echo "path is nil" | |
exit 0 | |
fi | |
DIR=`/usr/bin/dirname $PATH` | |
FILENAME=`/usr/bin/basename $PATH` | |
echo "dir : $DIR , file : $FILENAME" | |
cd $DIR | |
/usr/bin/git log --all -p -- "$PATH" > ~/Desktop/__log__.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment