Jevgeni,
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.
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.
Here's the main class involved:
https://github.com/arquillian/arquillian-container-openshift/blob/master/...
Here's where it is invoked:
https://github.com/arquillian/arquillian-container-openshift/blob/master/...
Perhaps it will provide some useful ideas.
-Dan
--
Dan Allen
Principal Software Engineer, Red Hat | Author of Seam in Action
Registered Linux User #231597
http://google.com/profiles/dan.j.allen
http://mojavelinux.com
http://mojavelinux.com/seaminaction