Push submodules to UVCS
Push GitHub submodules to your server.
阅读时间1 分钟最后更新于 10 个月前
Push GitHub submodules to your Unity Version Control (UVCS) server. When you push a GitHub submodule, GitServer translates them into UVCS 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:
>git push --all git://localhost/defaultCounting 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 that GitServer doesn't find as a valid UVCS repository. To solve the issue, create a repository named in UVCS and push the submodule repository to Gitserver:
mduemmduem>cm repository create mduem
>git clone https://github.com/user/mduem.gitCloning 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.
>git push --all git://localhost/mduemWriting 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
>git push --all git://localhost/defaultCounting 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:
[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 file:
gitserver.confrepository.mapping=git://github.com/user/mduem -> mduem-xlinked@localhost:8084 writable:true relativeserver:false
This example means that the repository translates to in UVCS.
mduemmduem-xlinkedSkip GitHub submodules
To skip GitHub submodules so that they don’t map to a UVCS repository, edit your files as follows:
gitserver.conf# 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 entries as you need.
ignore.submoduleUrl