1

I need to update an old site.

My idea is to upload only modified files to an FTP server to save connection bandwidth.

In the same time I want to anonymise the files, putting them into a "clean slate" or anonymous archive that doesn't contain any operating system information whatsoever (mostly of these information is contained in hidden files like lists of file logs, system informations, icons data, etc..), it takes a few seconds, for any operating system to write in any downloaded folder, but it can not access an archive or zipped folder.

Is there a way to tell Git to make a package (zip archive) of all files and folders being committed (modified) since a particular revision number (SHA) to the most recent version (HEAD)?

Let's say I've committed three files each one in a different folder in the last commit.

I want only those three files to be exported in an archive:

changed_files-from-[SHA]-to-HEAD-[SHA].zip

The purpose is to upload this archive file via ftp to a server and to uncompress it using a shell command on the server form the right folder.

This will then overwrite the existing files only with the three new files.

Mau
  • 1,257
  • 2
  • 15
  • 21
  • 1
    How about just checking out the version, then packaging and compressing the files using the tools of your choice (available on the platform you're using) – Jasper Nov 08 '12 at 14:39
  • 3
    http://stackoverflow.com/questions/160608/how-to-do-a-git-export-like-svn-export: `git archive` is what you're searching for. – eckes Nov 08 '12 at 14:53
  • I want only those three files to be exported in an archive. See edited example above. – Mau Nov 15 '12 at 13:25

0 Answers0