Hi all GIT gurus
I'd be grateful for help in achieving a scenario which I frequently use when testing things out on my moodle local test site.
- hack one or more core files
- test the hack
- produce a patch file against original core file(s)
- restore core files to their original state
Using ECLIPSE and CVS the scenario was very simple:
- hack file(s)
- test
- right-click file(s) /team / create patch (and save patch file somewhere)
- right-click file(s) / Replace with latest
Using GIT and TortoiseGIT
- hack
- test
- "commit" file(s) (in GIT parlance, "commit" means something different from CVS; your commit remains in your local folder; I do not need to take the next action, which is called "commit" in CVS and "push" in GIT, because I do not have writing rights on the main moodle GIT repository, but I have to "commit" in order to produce the patch in the next step)
- Create patch serial (and save patch file somewhere)
- now what do I do?
In GIT scenario step 5 I need to "un-commit" my commit, but I am lost with the choice of options I am offered in the TortoiseGit interface. I do not understand if or how I should use "rebase", "revert", "stash", etc. All I desperately need is to just "restore" my files the way they were before I hacked them.
Thanks in advance to anyone who can suggest the solution, alleviating my feelings against the "unfriendliness" I still feel about GIT.
Joseph