7-zip Mistakenly Zipping The Entire UserProfile folder¶
Context¶
When running 7-zip
to zip the .git
folder with command like
7z.exe a -r Home C:\Users\MyAccount\.git
7z will attempt to scan some other folders under C:\Users\MyAccount
such as C:\Users\MyAccount\AppData
, which is unexpected and undesired.
Problem¶
How to work around the issue and zip the .git
folder?
Solution¶
Run the following command instead:
7z.exe a -r Home C:\Users\MyAccount\.git\*