# Push submodules to UVCS

> Push GitHub submodules to your server.

Push GitHub submodules to your Unity Version Control (UVCS) server. When you push a GitHub submodule, GitServer translates them into UVCS [Xlinks](../xlinks).

If you push GitHub changes to GitServer, the operation can fail if submodules point to GitHub repositories that Gitserver doesn’t know how to resolve:

```text
>git push --all git://localhost/default
Counting objects: 143, done.
Writing objects: 100% (143/143), 106.43 KiB | 0 bytes/s, done.
Total 143 (delta 0), reused 143 (delta 0)
error: invalid ref status from remote: The specified repository couldn't be found: mduem.
To git://localhost/default
 ! [remote failure]  master -> master (remote failed to report status)
error: failed to push some refs to 'git://localhost/default'
```

In this case, there's a submodule that points to a repository called `mduem` that GitServer doesn't find as a valid UVCS repository. To solve the issue, create a repository named `mduem` in UVCS and push the submodule repository to Gitserver:

```text
>cm repository create mduem
```

```text
>git clone https://github.com/user/mduem.git
Cloning into 'mduem'...
remote: Counting objects: 461, done.
Receiving objects:  95% (438/461)
Receiving objects: 100% (461/461), 68.40 KiB | 0 bytes/s, done.
Resolving deltas: 100% (172/172), done.
Checking connectivity... done.
```

```text
>git push --all git://localhost/mduem
Writing objects: 100% (453/453), 731.45 KiB | 0 bytes/s, done.
Total 453 (delta 0), reused 453 (delta 0)
To git://localhost/mduem
 * [new branch]      master -> master
```

```text
>git push --all git://localhost/default
Counting objects: 118, done.
Writing objects: 100% (118/118), 83.75 KiB | 0 bytes/s, done.
Total 118 (delta 0), reused 118 (delta 0)
To git://localhost/default
   46232e0..41c12e1  master -> master
```

In this case, the Git submodule definition is as follows:

```text
[submodule "mduem"]
        path = mduem
        url = git://github.com/user/mduem
```

## Customize GitHub submodule mappings to UVCS Xlinks

To customize the mapping between the GitHub submodule and the UVCS  Xlink, add the following entry to the `gitserver.conf` file:

```text
repository.mapping=git://github.com/user/mduem -> mduem-xlinked@localhost:8084 writable:true relativeserver:false
```

This example means that the `mduem` repository translates to `mduem-xlinked` in UVCS.

## Skip GitHub submodules

To skip GitHub submodules so that they don’t map to a UVCS repository, edit your `gitserver.conf` files as follows:

```text
# when a submodule points to one of the following
# git URLs, it will be ignored.
ignore.submoduleUrl= git://github.com/user/mduem
```

You can add as many `ignore.submoduleUrl` entries as you need.
