How to get files from a commit, to a folder outside from my repository?
<p>I need to get the files from 2 commits(of my choice) and put in 2 diferent folders outside my repository, i'll do a process, and than i need to be able to erase those 2 folders after.</p>

<p>I aready try some commands,<code>git -clone</code> doesn't work for me, i dont need the entire repository, just certain commits(one folder for each), and i have some inssues trying to erase the folder.</p>

<p>Other that i tried was <code>git archive</code>but the output didnt work for me. I need the files in the same way as the repository. </p>

<p>The one who went pretty close was <code>git --work-tree=&lt;path&gt; checkout &lt;sha&gt; -- .</code> but this command was stashing the files(who has diferences) on my repository, and i dont want that. </p>

<p>Is possible to do what i want, without making changes on my repository ?</p>