如何推送到Gitlab上的远程git分支?

Sei*_* E. 3 git git-push gitlab

我在 GiLab 上有这个存储库:

https://gitlab.com/testrepo/api.git
Run Code Online (Sandbox Code Playgroud)

该存储库上有一个名为 的分支testing。我怎样才能推送到testing这个仓库的分支?

如果我做:

git push origin master
Run Code Online (Sandbox Code Playgroud)

它会将我的主人推向可能是回购协议的主人。

mu *_*u 無 5

您可以使用命令:

git push origin <your_local_branch>:<remote_branch>
Run Code Online (Sandbox Code Playgroud)

推送 git 中的任何分支。在您的示例中,这相当于运行:

git push origin master:testing
Run Code Online (Sandbox Code Playgroud)