- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
当我执行 git branch 时,我知道我在分支 v0.2 上。
git branch
v0.1
* v0.2
但是当我执行 git push 时它说“你当前分支的上游分支与你当前分支的名称不匹配”
git push
fatal: The upstream branch of your current branch does not match
the name of your current branch. To push to the upstream branch
on the remote, use
git push origin HEAD:v1.1
To push to the branch of the same name on the remote, use
git push origin v0.2
最初我将该分支命名为 v1.1,但现在我在本地和远程将其重命名为 v0.2。
我怎样才能一劳永逸地解决这个问题。
最佳答案
Git 跟踪哪个本地分支与哪个远程分支。当您重命名远程分支时,git lost track 哪个远程与您的本地 v0.2
分支一致。您可以使用分支命令的 --set-upstream-to
或 -u
标志来解决此问题。
git checkout v0.2
git branch -u origin/v0.2
现在,当您执行 git push
时,git 会知道您的本地 v0.2
与哪个分支配对。
关于git - 本地和远程分支名称相同仍然得到 "The upstream branch of your current branch does not match the name of your current branch ",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27257761/
根据这个article , git push --set-upstream 已弃用,应改用 git push --set-upstream-to。 但是当我检查 git push文档,我只能找到--s
无意中,创建了一个分支remotes/upstream/upstream/develop。上游受 GitHub 控制。标准删除命令失败: $ git fetch --all $ git branch
我的网站在端口 80 (http) 上运行,我使用 nginx 没有任何问题。下面是我在 nginx 中使用的默认文件 server { listen 80; server_name
这个问题在这里已经有了答案: Undo a Git merge that hasn't been pushed yet (35 个答案) 关闭 9 年前。 这个问题与其他问题的不同之处在于,我想在恢
我们在 NGINX 后面有带有 Jersey 服务 API 的 tomcat。我们开发的一个新的流式 API 在我们直接调用 Tomcat 时运行良好,但在通过 NGINX 调用它时开始没有响应。 查
在我的 Remote 列表中,我看到:(git branch -r) upstream/HEAD -> upstream/master 当然,我有一个 upstream/master,origin 是
git rebase upstream/master 和 git pull --rebase upstream master 之间有区别吗?如果有,那是什么?远程可以是任何远程,不一定是上游。 最佳答
我正在尝试按照一些步骤为 GitHub 上的存储库做贡献,但其中一个步骤不起作用。步骤在这里:https://github.com/wdbm/qTox/blob/master/CONTRIBUTING
我使用本教程部署了一个 Django 网站 https://jee-appy.blogspot.com/2017/01/deply-django-with-nginx.html 该网站可从互联网 ww
TL; 博士 Nginx 日志时出现什么http/tcp 现象upstream prematurely closed connection while reading response header
我有一个 Django 应用程序,用户可以使用该应用程序使用多个视频创建视频拼贴画。问题是,在生产中,当将视频上传到 amazon s3 时,我得到一个 502 错误的网关(在本地工作正常)。有谁知道
我的 rails nginx/unicorn 服务器出现上游超时错误。我已尝试解决此问题,但没有找到适合我的解决方案。 我正在粘贴我在 nginx error.log 文件中得到的确切错误: ups
我目前总是在我的用户正在执行的查询中得到 502...这通常返回 872 行并且需要 2.07 才能在 MySQL 中运行。然而,它返回了很多信息。 (每一行都包含很多东西)。有什么想法吗? 运行 D
我在错误日志中收到如下 nginx 错误: [error] 4257#0: *3470 upstream timed out (110: Connection timed out) while rea
我试图将更改从上游 pull 到我的分支中。我试过 git fetch https://github.com/someuser/someproject,但它顽固地拒绝做任何事情。它只是说了一些完全隐晦
/编辑我做了the answer to the question mentioned above的建议授予对注册表的访问权限,如下所示: sudo mkdir -p /usr/local/etc/mo
配置例子 ? 1
我用 upstream和 proxy用于负载平衡。 指令 proxy_pass http://upstream_name使用默认端口,即 80。 但是,如果上游服务器不监听此端口,则请求将失败。 如何
我使用 nginx 作为代理服务器将请求转发到我的 gunicorn 服务器。当我运行 sudo nginx -t -c/etc/nginx/sites-enabled/mysite 时,出现以下错误
我的 git 似乎一团糟。 我首先重命名了一个名为分支 Sprint/13/Story/XXX-11 的分支 使用这个: git branch -m Sprint13/Story/XXX-11 这并没
我是一名优秀的程序员,十分优秀!