I have committed many files in different directorys using intellij and git. How to download these committed files with their directories structure?
- 1What do you mean by "download files from a commit"?Brian61354270– Brian613542702024-04-12 16:34:01 +00:00Commented Apr 12, 2024 at 16:34
- Do you want to download all content of the repo as it is in a commit X? Or a "patch" matching what changed in commit X? Or.. something else? I assume you want something doable by someone not having Git installed, right?Gaël J– Gaël J2024-04-12 17:13:01 +00:00Commented Apr 12, 2024 at 17:13
Add a comment |
1 Answer
I think what you're asking for is "git archive". If you want a zip file containing all the source files at their current version without any of the extra Git files, you can do:
git archive -o myproject.zip HEAD ...and then copy myproject.zip somewhere else and unzip it.
Do "git help archive" for more options. You can create *.tar files instead of *.zip, and specify older versions instead of the current, etc.