The correct expression is -x '*.git*', so the full command should be:

zip -r bitvolution.zip ./bitvolution -x '*.git*'

An explanation from http://selfsolved.com/problems/zip-command-exclude-svn-director:

The correct incantation is

zip -9 -r --exclude=*.svn*  foo.zip [directory-to-compress]

You can also add a
--exclude=*.DS_Store* to exclude the annoying Mac OS X directory display metadata files.

Notice that the expression passed to --exclude is using the entire original relative directory path as the original string to match against. So .svn/* by itself doesn't work; the wildcard character in front ensures that it matches .svn directories anywhere in the directory tree.

Answer from Isaiah on askubuntu.com
🌐
George Washington University
www2.seas.gwu.edu › ~simhaweb › gatewaytocs › gitbash › gitBash.html
Installing and Using Git Bash
Click on the "Zip" button to create a zip file of the folder. ... To upload this into Blackboard or Google-drive, open an internet browser of your choice (Chrome/Edge/Safari/Firefox/etc.) and proceed in the usual way. This section is only for advanced courses that need jar files to be included ...
Discussions

How to add man and zip to "git bash" installation on Windows - Stack Overflow
Where from can I install them? I do not want to install another copy of the MINGW system! Any way just to add some pre-compiled tools to the git bash installation? ... In the zipped file, in the bin folder, find the file zip.exe. More on stackoverflow.com
🌐 stackoverflow.com
command line - Zip all files in directory? - Unix & Linux Stack Exchange
Is there a way to zip all files in a given directory with the zip command? I've heard of using *.*, but I want it to work for extensionless files, too. More on unix.stackexchange.com
🌐 unix.stackexchange.com
Zip a git repository directory with `.git` directory included - Stack Overflow
I am trying to zip a git repository directory with the .git directory included. I tried doing a tar on the directory, but it creates a bigger folder than original because it appends all the submodu... More on stackoverflow.com
🌐 stackoverflow.com
command line - Zip the contents of a folder without including the folder itself - Unix & Linux Stack Exchange
I have a directory called folder that looks like this: folder -> root_folder -> some files I want to zip this directory into zipped_dir, I tried: zip -r zipped_dir... More on unix.stackexchange.com
🌐 unix.stackexchange.com
January 30, 2015
🌐
Medo's Home Page
medo64.com › posts › zip-in-git-bash
Zip in Git Bash · Medo's Home Page
For example, while Bash on Linux and Windows works out the same, a lot of supporting tools differ - a lot. And there’s no better example than creating a zip archive. Under Linux you can count on zip command being available. Even if one doesn’t have it, it’s easy to install without messing with their desktop. On Windows story gets more complicated. Git Bash for example doesn’t have it even compiled and there’s no really good way to add it.
🌐
Medium
terrislinenbach.medium.com › a-bash-script-to-zip-uncommitted-files-1115e4a6a5cd
A bash script to archive new and uncommitted files in a local git repository | by Terris Linenbach | Medium
July 12, 2026 - # Copy the file to the target directory cp "$file" "$target_dir/" || error "Failed to copy file: $file" else debug_echo "Skipping deleted file: $file" fi done <<< "$combined_files" # Create the zip file with the repository and branch name zip_file="${repo_name_sanitized}-${branch_name_sanitized}-$(generate_timestamp).zip" ( cd "$temp_dir" || error "Failed to change directory to temporary directory." zip -r "$zip_file" ./* >/dev/null || error "Failed to create zip archive." ) # Define the backup directory path backup_dir="$HOME/.git-backups/${repo_name_sanitized}-${branch_name_sanitized}" # Create the backup directory mkdir -p "$backup_dir" || error "Failed to create backup directory: $backup_dir" # Move the zip file to the backup directory mv "$temp_dir/$zip_file" "$backup_dir/" || error "Failed to move zip file."
🌐
W3Schools
w3schools.com › bash › bash_zip.php
Bash zip Command - Package and compress (archive) files
Bash Compress (zip) Bash Extract (unzip) Bash TAR Archive ... The zip command is used to package and compress files into a ZIP archive. To create a ZIP archive, use zip archive.zip file1 file2: zip archive.zip file1 file2 adding: file1 (stored 0%) adding: file2 (stored 0%) Here are some common options you can use with the zip command: ... The -r option allows you to zip directories and their contents recursively...
🌐
Git
git-scm.com › docs › git-archive › 2.34.0
Git - git-archive Documentation
git archive --format=zip --prefix=git-docs/ HEAD:Documentation/ > git-1.4.0-docs.zip
Find elsewhere
🌐
Graphite
graphite.com › guides › git-archive
How to use the `git archive` command - Graphite
The --remote flag allows you to create an archive of a repository that's hosted remotely, without needing to have the repo stored on your local machine. ... git archive --remote=<repository URL> <branch> | <commit> | <tag> | <tree-ish> <path> ...
🌐
GitHub
gist.github.com › LeonardoCardoso › 6c083b90a8c327d8c82f
Zip folder ignoring files listed on .gitignore · GitHub
Then use the command "source" to restart them. ... #if you want the file to have the name of the current folder if you're lazy about typing the zipfile name git archive HEAD -o ${PWD##*/}.zip
🌐
Wordpress
ranxing.wordpress.com › 2016 › 12 › 13 › add-zip-into-git-bash-on-windows
Add zip into GIT Bash on Windows | Identity and Access Management blog
December 13, 2016 - While using git-bash, you may need the zip command to zip files. 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.
🌐
CodeGenes
codegenes.net › blog › how-do-i-export-my-project-as-a-zip-of-git-repository
How to Export a Git Repository Project as a Zip File Using the Command Line: Step-by-Step Guide — codegenes.net
Without a prefix, the files extract directly into whatever directory you unzip them in: git archive --format=zip --prefix=my-project/ --output=my-project-export.zip HEAD · After creating the archive, list its contents to confirm it isn’t ...
🌐
GitHub
gist.github.com › 7579786
Linux: zip/unzip folder on linux terminal · GitHub
Linux: zip/unzip folder on linux terminal. GitHub Gist: instantly share code, notes, and snippets.
🌐
Rene Nyffenegger
renenyffenegger.ch › notes › Linux › shell › commands › zip
Create zip archives on the shell
The command line option -r adds files recursively. Thus, it allows to create a zip file from an entire (sub-)directory:
🌐
Linuxize
linuxize.com › home › linux commands › zip command in linux: zip files and directories
zip Command in Linux: Zip Files and Directories | Linuxize
5 days ago - When the directory contains symbolic links, zip follows them by default and stores a copy of the file each link points to. If you want the archive to keep the links themselves, add the -y option: ... To zip everything in the current directory, including hidden files and directories, run zip from inside the directory and write the archive outside it:
🌐
LinuxVox
linuxvox.com › blog › how-to-compress-multiple-folders-each-into-its-own-zip-archive
How to Compress Multiple Folders into Individual Zip Files Using a BASH Script — linuxvox.com
Folders with spaces (e.g., my photos/) will break the script unless variables are quoted. Our script already uses "$folder_name" (quotes), which safely handles spaces. By default, zip -r includes hidden files (those starting with ., such as ...