Export files from git repository.
Export {SHA} fileset.
$ git-export-copy.rb {SHA}
-a {type} # ARCHIVE FORMAT (zip, tar, tgz, tar.gz)
-o {/path/to} # OUTPUT DIRECTORY TARGET
-f {format_string} # DIRECTORY NAME WITH FORMAT
Export diff files between {SHA1} and {SHA2}.
$ git-export-diff.rb {SHA1} {SHA2}
-a {type} # ARCHIVE FORMAT (zip, tar, tgz, tar.gz)
-o {/path/to} # OUTPUT DIRECTORY TARGET
-f {format_string} # DIRECTORY NAME WITH FORMAT
Export deleted file list between {SHA1} and {SHA2}.
$ git-export-deleted.rb {SHA1} {SHA2}
-o {/path/to} # OUTPUT DIRECTORY TARGET
-f {format_string} # DIRECTORY NAME WITH FORMAT
- If already exist directory or archive, attach suffix "-%03d".
- In the case set custom action(SourceTree), set $SHA to parameters.
- Load config from git-export-config.yml if exist in repository. (use sample)
- cli parameter overwrite git-export-config.yml parameters.
You can also set parameters above by git-export-config.yml exists in repository
use this sample:
copy:
archive: zip # or tar, tgz, tar.gz
output: ../
#format: "EXPORT-%y%m%d_%H%M"
diff:
archive: zip # or tar, tgz, tar.gz
output: ../
#format: "DIFF-%y%m%d_%H%M"
deleted:
output: ../
#format: "DELETED-%y%m%d_%H%M"
Install ruby and git.
- Install ruby for Windows RubyInstaller for Windows
- Install git for Windows Git for Windows
- Set ruby and git in PATH.
- Set "ruby" to Script to run.
- Set "{path/to/script.rb} -a zip $SHA" to Parameters
Unfortunately, tar doesn't work well on Windows. So output is limited zip format.