Git:仅将已提交的更改推送到当前分支

时间:2019-07-30 10:53:44

标签: git


我正在主存储库的一个分支上:

$ git branch
* as-testsuite
  master

我添加了未暂存的更改并提交了它们。现在,我想将它们推入当前分支“作为测试者”。只是在该分支上,不是在我的主分支中。

$ git push
fatal: The current branch as-testsuite has no upstream branch.
To push the current branch and set the remote as upstream, use

我确实已经添加了一个用于推送的上游存储库(正如我从git remote -v中看到的那样)。愚蠢的问题,如果要使用当前分支,为什么还必须提供其他选项? 我应该使用吗?

$ git push origin as-testsuite

非常感谢

0 个答案:

没有答案