LoginSignup
5
5

More than 5 years have passed since last update.

GITで特定のコミットで修正したファイルの一覧をエクスポートする。

Posted at

GITで特定のコミットで修正したファイルの一覧を出力する方法
.gitconfigのAliasに以下を追加。

# 指定したコミットで修正されたファイルを出力する
# 例:git export a85419253dd8eaffcaa718a443365be9f57d63ea ./output
export = "!f() {\n\
             for file in `git diff --name-only $1 $1^`; do \n\
                 git archive --prefix=$2/ $1 $file | tar -xf - ; \n\
             done ; \n\
         }; f"
5
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
5