Jevgeni,<div><br></div><div>I came across some code last week that may prove to be a useful reference for the git-based undo functionality you are working on for Forge.</div><div><br></div><div>The Aquillian OpenShift container adapter uses a temporary git repository to stage the project in order to push it to a separate remote location where the tests are run. What you might find useful about this plugin is the use of jgit and the synchronization of state from the current repository to the temporary repository.</div>

<div><br></div><div>Here&#39;s the main class involved:</div><div><br></div><div><a href="https://github.com/arquillian/arquillian-container-openshift/blob/master/openshift-express/src/main/java/org/jboss/arquillian/container/openshift/express/OpenShiftRepository.java">https://github.com/arquillian/arquillian-container-openshift/blob/master/openshift-express/src/main/java/org/jboss/arquillian/container/openshift/express/OpenShiftRepository.java</a></div>

<div><br></div><div>Here&#39;s where it is invoked:</div><div><br></div><div><a href="https://github.com/arquillian/arquillian-container-openshift/blob/master/openshift-express/src/main/java/org/jboss/arquillian/container/openshift/express/OpenShiftExpressContainer.java">https://github.com/arquillian/arquillian-container-openshift/blob/master/openshift-express/src/main/java/org/jboss/arquillian/container/openshift/express/OpenShiftExpressContainer.java</a></div>

<div><br></div><div>Perhaps it will provide some useful ideas.</div><div><br></div><div>-Dan<br clear="all"><div><br></div>-- <br><div>Dan Allen</div>Principal Software Engineer, Red Hat | Author of Seam in Action<br>Registered Linux User #231597<br>

<br><div><a href="http://google.com/profiles/dan.j.allen" target="_blank">http://google.com/profiles/dan.j.allen</a><br><a href="http://mojavelinux.com" target="_blank">http://mojavelinux.com</a><br><a href="http://mojavelinux.com/seaminaction" target="_blank">http://mojavelinux.com/seaminaction</a><br>

</div><br>
</div>