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
🌐
Medo's Home Page
medo64.com › 2021 › 09 › zip-in-git-bash
Zip in Git Bash · Medo's Home Page
September 19, 2021 - perl -e ' use strict; use warnings; use autodie; use IO::Compress::Zip qw(:all); zip [ "src/mimetype", <"src/META-INF/*.*">, <"src/OEBPS/*.*">, <"src/OEBPS/chapters/*.*"> ] => "bin/book.epub", FilterName => sub { s[^src/][] }, Zip64 => 0, or die "Zip failed: $ZipError\n"; ' Yeah, might not be ideal when it comes to beauty but it definitely works across platforms.
🌐
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. …
🌐
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."
🌐
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 ...
🌐
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
🌐
Super User
superuser.com › questions › 1355101 › saving-zip-file-attachments-and-reading-them-in-git-bash
windows - Saving ZIP file attachments and reading them in Git Bash - Super User
September 4, 2018 - Using 7-zip, I created a Zip file by zipping up a directory that I could see in git bash. For reference, this file was in ~/Documents. In Windows explorer, the Zip "folder" created (because Windows Explorer seems to see all Zip files as "folders") has these properties:
Find elsewhere
🌐
Commandlinefu
commandlinefu.com › commands › view › 6101 › bash-script-to-zip-a-folder-while-ignoring-git-files-and-copying-it-to-dropbox
bash script to zip a folder while ignoring git files and copying it to dropbox
July 16, 2010 - git archive HEAD --format=zip > archive.zip - (bash script to zip a folder while ignoring git files and copying it to dropbox Better tool for exporting git's repository is Git itself!). The best command line collection on the internet, submit yours and save your favorites.
🌐
W3Schools
w3schools.com › bash › bash_zip.php
Bash zip Command - Package and compress (archive) files
To create a ZIP archive, use zip ... ... The -r option allows you to zip directories and their contents recursively. zip -r archive.zip folder/ adding: folder/ (stored 0%) adding: folder/file1 (stored 0%) adding: folder/file2 ...
🌐
YouTube
m.youtube.com › shorts › 0F1GqIK6vTs
Git: Simple .zip archives of your repos!
Share your videos with friends, family, and the world
Published: October 29, 2022
🌐
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
🌐
Home
incedibleholgnotes.home.blog › 2019 › 03 › 29 › how-to-add-man-and-zip-to-git-bash-installation-on-windows-stack-overflow
How to add man and zip to “git bash” installation on Windows – Stack Overflow
March 29, 2019 - Here are the steps you can follow. Go to the following link 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. Othe…
🌐
GitHub
gist.github.com › HansCz › 2376190
Git - zip a git repo root folder while ignoring git files and copying it somewhere · GitHub
Git - zip a git repo root folder while ignoring git files and copying it somewhere - zip-repo.bash