void checkCanAddToRepository() throws IOException {
		if (!versionedFileSystem.isOnline()) {
			throw new NotConnectedException("Not connected to repository server");
		}
		if (fileSystem.isReadOnly() || versionedFileSystem.isReadOnly()) {
			throw new ReadOnlyException(
				"versioning permitted within writeable project and repository only");
		}
		if (folderItem == null) {
			throw new FileNotFoundException("File not found");
		}
		if (folderItem.isCheckedOut() || versionedFolderItem != null) {
			throw new IOException("File already versioned");
		}
		ContentHandler<?> contentHandler = getContentHandler();
		if (contentHandler instanceof LinkHandler linkHandler) {
			// must check local vs remote URL
			if (!GhidraURL.isServerRepositoryURL(LinkHandler.getURL(folderItem))) {
				throw new IOException("Local project link-file may not be versioned");
			}
		}
		else if (contentHandler.isPrivateContentType()) {
			throw new IOException("Content may not be versioned: " + getContentType());
		}
	}
Perform neccessary check to ensure this file may be added to version control.
@throws IOException if any checks fail or other IO error occurs
Ghidra/Framework/Project/src/main/java/ghidra/framework/data/GhidraFileData.java