2

I am working on one portion of the repository and I just want to save directory with the code which I have committed.I am looking for a command to save one particular commit into a directory. That commit may be of mine or of my team member.

Adarsh Sharma
  • 472
  • 2
  • 15
  • Possible duplicate of [git: How to rebase all commits by one certain author into a separate branch?](http://stackoverflow.com/questions/5663297/git-how-to-rebase-all-commits-by-one-certain-author-into-a-separate-branch) – Prashanth Chandra Feb 24 '17 at 07:18
  • 1
    @PrashanthChandra it is not duplicate of that question. What I want id to save my latest commit into a directory. – Adarsh Sharma Feb 24 '17 at 07:19
  • 1
    Then you should update your question to clarify because that is not how it reads. – Daniel Smith Feb 24 '17 at 07:21

1 Answers1

7

You can use git archive command for this

git archive --format zip --output src.zip ad73856aab3c37d73c1dcd657398259ae30b46df

here zip is the format of archive for exporting the project files.

src.zip is the path where the src is exported.

Ravikant Tiwari
  • 371
  • 3
  • 11