# Submit(ChangeSet, AssetList, string, bool)

> Starts a task that submits the assets to version control.

## Definition

* **Type:** Method
* **Namespace:** [UnityEditor.VersionControl](/engine/6000.6/script-reference/unityeditor/versioncontrol.md)
* **Assembly:** UnityEditor.CoreModule

```csharp
public static Task Submit(ChangeSet changeset, AssetList list, string description, bool saveOnly)
```

### Parameters

**** (\[ChangeSet]\(/engine/6000.6/script-reference/unityeditor/versioncontrol/changeset)): The changeset to submit.**** (\[AssetList]\(/engine/6000.6/script-reference/unityeditor/versioncontrol/assetlist)): The list of assets to submit.**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The description of the changeset.**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): If true then only save the changeset to be submitted later.

### Returns

| Type                                                                       | Description |
| -------------------------------------------------------------------------- | ----------- |
| [Task](/engine/6000.6/script-reference/unityeditor/versioncontrol/task.md) |             |

### Remarks

In version control systems like Git new changes have to be committed and then pushed to the repository separately. In Perforce or Plastic SCM a submit is an all in one task that both commits and pushes the newly made changes all at once.

### Examples

```csharp
using System.Collections.Generic;
using UnityEditor;
using UnityEditor.VersionControl;
using UnityEngine;

public class EditorScript : MonoBehaviour
{
    [MenuItem("Version Control/Submit")]
    public static void ExampleSubmit()
    {
        AssetList assets = new AssetList();
        assets.Add(Provider.GetAssetByPath("Assets/ExampleAsset.cs"));
        Task t = Provider.Submit(new ChangeSet(), assets, "Example Description", saveOnly: false);
        t.Wait();
    }
}
```
