GitUp uses libgit2 under the hood. GitUpKit is an Obj-C wrapper I wrote at the time to make it much easier to use.
Unlimited undo / redo is achieved by taking a snapshot of the entire repo before and after any operation (e.g. checking out the repo or creating a branch etc...). The inspiration I had at the time was that is it is trivially cheap to take such snapshots: essentially all you need is a list of all the refs.
Then when you need to undo, you have 3 things:
1 - current state of all the refs in the repo
2 - state of all the refs from the before snapshot
3 - state of all the refs from the after snapshot
Compute the delta between 3 -> 2 and apply on top of 1.
The same technique allows to do the Time Machine feature.
But yes, I wasn't really worth actively maintaining it as it was feature complete and I didn't intend to build a business out of it.