你能把代码从一个分支推送到另一个分支,从不同的下游推送到不同的上游吗

  • 本文关键字:分支 代码 一个 另一个 git gitlab
  • 更新时间 :
  • 英文 :


我在本地机器的另一个分支上工作,但我想将代码推送到上游的另一分支。这是怎么做到的。我正在尝试推送至nicholas dev
这是错误消息,我正在获取

C:UsersnjocaDocumentsBoTestboegisexternal (dev-samuel -> origin)
λ git push nicholas-dev
fatal: 'nicholas-dev' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.

您需要使用:

git push origin dev-samuel:nicholas-dev

其中,origin是远程的名称,dev-samuel是本地分支的名称,而nicholas-dev是远程上分支的名称。

最新更新