What is `git archive` and why use it instead of zipping the folder?
IntermediateConceptCommits, branches and tags
Answer
<details> <summary><b>Answer</b></summary>
It exports a tree at any revision as tar or zip without the .git directory, honouring export-ignore and export-subst attributes. It is reproducible and uses committed content only, so no stray local files leak into a release tarball.
git archive --format=tar.gz --prefix=app-1.4.0/ -o app-1.4.0.tar.gz v1.4.0
More on Commits, branches and tags
How do you write a good commit message?BeginnerWhat is the difference between `git add .`, `git add -A` and `git add -u`?BeginnerHow do you commit only part of the changes in a file?BeginnerHow do you change the last commit message or add a forgotten file?BeginnerWhat is the difference between `git switch`, `git restore` and `git checkout`?BeginnerWhat is the difference between lightweight and annotated tags?Beginner