LoginSignup
0
0

More than 5 years have passed since last update.

gitを使って変更したファイルのみを取り出す方法。

Last updated at Posted at 2015-06-27

git archiveを使う

ユーザーのpeperonという場所に、「html.zip」という形式でファイルを出力する例。

$ git archive --format=zip HEAD `git diff master --name-only --diff-filter=AM` -o C:\User\peperon\html.zip

masterと現在のブランチを比較し、削除されたファイルを除き、変更があったファイルをアウトプット(-o)しています。(コマンドライン慣れてない人、半角スペース注意。)

以上、エンジニアさんに聞いた方法です。
納品ファイル漏れで始末書にならずに済むので、きっと便利。

0
0
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
0
0