LoginSignup
1
1

More than 5 years have passed since last update.

git archive でリリースファイルをzipファイルでまとめる方法

Last updated at Posted at 2016-08-22

まるごとアーカイブ

現在のブランチの最終コミットのツリーを archive.zip というファイル名でアーカイブする場合です。

git archive HEAD -o archive.zip

差分のみアーカイブ

HEADから1つ前のコミットの差分フィアルだけをアーカイブする場合です。2つ前や3つ前のコミットを指定したい場合は「HEAD~2」「HEAD~3」など。

git archive HEAD `git diff --name-only HEAD HEAD~` -o archive.zip

■参考
http://rfs.jp/server/git/gite-lab/git-archive.html

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