Click or drag to resize

IVersionControl Methods

The IVersionControl type exposes the following members.

Methods
 NameDescription
Public methodCheckoutBranchAsync Checks out a specified branch. Note that any unsaved or uncommitted changes will be lost.
Public methodCheckoutCommitAsync Checks out a specified commit, resulting in a detached HEAD. Note that any unsaved or uncommitted changes will be lost.
Public methodCommitAsync Commits all current changes.
Public methodEnableVersionControl Enables version control for this document.
Public methodMakeSubfoldersNotReadOnly Removes the read-only attribute from all subfolders. OneDrive often likes to make folders read-only, so for models/catalogs saved to OneDrive, the subfolders are often automatically read-only. This causes problems for Git, as it needs to be able to delete the folders when checking out a commit, so we need to remove the read-only attribute.
Public methodReload Reloads the current document.
Public methodRevertToCommitAsync Reverts to a specified commit by creating a new commit that reverts all more recent commits. Note that any unsaved or uncommitted changes will be lost.
Public methodSaveChanges Saves any unsaved changes.
Public methodShowCommitDifferences Shows visually the differences between two versions of a specified file.
Public methodShowLocalDifferences Shows visually the differences between the local copy and the last committed version of a file.
Public methodSuspendCommitChangedExternally Gets an IDisposable instance which will disable publishing of the CommitChangedExternally event and re-enable when disposed.
Public methodUndoLocalChangesAsync Deletes all local changes.
Top
See Also