Skip to content

Instantly share code, notes, and snippets.

@uranuno
Created February 13, 2018 06:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save uranuno/6027adf32ef4a24a9802b5566af090b8 to your computer and use it in GitHub Desktop.
Save uranuno/6027adf32ef4a24a9802b5566af090b8 to your computer and use it in GitHub Desktop.
Gitで差分ファイル一覧をテキストファイルとして出力する(SourceTreeカスタムアクション用)
#!/bin/sh
if [ "$2" = "" ]; then
git diff --name-status HEAD $1 > diff-ns-HEAD-${1:0:9}.txt
else
git diff --name-status $1 $2 > diff-ns-${1:0:9}-${2:0:9}.txt
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment