If you try to use zip command. Then you will get error like “command not found“. This is because git-bash is really just a cut down version of mingw. Fortunately you can manually install the command yourself, not only zip, but any command you can get from gnuwin32.

Here are the steps you can follow.

1. Go to the following link
https://sourceforge.net/projects/gnuwin32/files/

2. Find out whatever command you are missing
Here I need zip and bzip2 for zip command. Because zip command relies on bzip2.dll to run. Otherwise you will get error “error while loading shared libraries: ?: cannot open shared object file: No such file or directory”.

3. Unzip the downloaded files
Here I am downloading “zip-3.0-bin.zip” for “zip.exe” and “bzip2-1.0.5-bin.zip” for “bzip2.dll” in the bin folder. <unzipped file>/bin/<command>.exe

4. Copy the command exe file into git-bash folder
Here I am copying “zip.exe” and “bzip2.dll” to C:Program FilesGitusrbin.

On windows 10 you can use tar command instead to output .zip

Or install another utility form here:
https://superuser.com/questions/201371/create-zip-folder-from-the-command-line-windows http://gnuwin32.sourceforge.net/packages/zip.htm

https://ranxing.wordpress.com/2016/12/13/add-zip-into-git-bash-on-windows/

0
Would love your thoughts, please comment.x
()
x