Skip to content

Instantly share code, notes, and snippets.

@serkodev
Last active December 14, 2023 18:03
Show Gist options
  • Select an option

  • Save serkodev/aa9722be022be5b8974778875ca985d8 to your computer and use it in GitHub Desktop.

Select an option

Save serkodev/aa9722be022be5b8974778875ca985d8 to your computer and use it in GitHub Desktop.
Archive current folder to zip and ignore files from gitignore
# archive folder including uncommit files
git ls-files --others --exclude-standard --cached | zip --names-stdin archive.zip
# archive folder of latest commit, all of the uncommit changes will not included
git archive -o archive.zip HEAD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment