How to make Undomanager forget last chang

I add a node into a docment and want this operation is unable to undo? How can implement this?

best regards

I assume you are asking about how to use undo/redo programmatically, rather than the user using ^Z and ^Y.
The typical execution sequence, not necessarily all in one method, is:
GoDocument doc = new GoDocument();
doc.UndoManager = new GoUndoManager(); // this turns on recording of changes within transactions
doc.StartTransaction();
// add, modify, and/or remove objects…
doc.FinishTransaction(“made some changes”);
doc.Undo();