- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
develop (non-fast-forward)"-6ren"> develop (non-fast-forward)"-我有一个提交列表(最新的在前): abcd4 message abcd3 wrong commit message2 abcd2 wrong commit message1 abcd1 message-6ren">
我有一个提交列表(最新的在前):
abcd4 message
abcd3 wrong commit message2
abcd2 wrong commit message1
abcd1 message
我需要更改 abcd2
和 abcd3
的提交消息。我正在按照以下方式进行操作:
rebase -i abcd1
然后,在交互模式下,我将 pick
替换为 reword
,更改必要的提交消息并保存更改。这里一切正常。
问题如下:分支已完全推送到 Bitbucket,因此 Bitbucket 上也有错误的提交消息。
我尝试推送更改但出现错误:
! [rejected] develop -> develop (non-fast-forward)
error: failed to push some refs to 'https://login@bitbucket.org/user/repository.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
我试图提取更改,但没有成功。完成 pull 后很奇怪:
git log --pretty=format:'%h %s' --graph
* ccceeefff Merge branch 'develop' of https://bitbucket.org/user/repository into develop
|\
| * abcd3 wrong commit message2
| * abcd2 wrong commit message1
* | new_hash_of_abcd3 new commit message2
* | new_hash_of_abcd2 new commit message1
|/
* abcd1 message
所以我的问题是:在我的案例中更改消息的正确方法是什么?
最佳答案
您应该能够强制推送(假设您已将 bitbucket 设置为远程“来源”):
git checkout develop
git push -f origin develop
请注意,在您这样做之前,您可能需要重置您的本地开发分支(如果它现在指向您的 pull/merge 提交):
git checkout develop
git reset --hard new_hash_of_abcd3
git push -f origin develop
关于Git 推送错误 : "! [rejected] develop -> develop (non-fast-forward)",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24414854/
以下操作是否完全相同: request.setAttribute(name,"visited"); requestDispatcher.forward(request,response) 和
有两个 header 用于处理请求转发。首先是 X-Forwarded-For第二个是 Forwarded . 我应该使用哪一个? X-Forwarded-For 是事实上的,而 Forwarded
看the documentation for std::forward , template constexpr T&& forward( typename std::remove_reference
给定一个手电筒的nn.Module带有预前钩,例如 import torch import torch.nn as nn class NeoEmbeddings(nn.Embedding):
为了在我的 ASP.NET 应用程序中获取客户端 IP 地址,我使用了 X-Forwarded-For,并从列表中获取第一个 IP 地址(根据我找到的信息,有一个客户端,代理1、代理2..)。但我最近
以下 header 有什么区别? X 转发主机 X 转发服务器 在 Apache 作为代理、Tomcat 作为源服务器的设置中,我在到达 Tomcat 的 HTTP 请求中看到它们。值是(这是我自己的
假设我想要一个通用的高阶函数。最常见的方法是: 一个。通用 lambda auto F1 = [](auto f) { /*...*/ } B.函数模板 template auto F2(F&& f)
为了在我的 ASP.NET 应用程序中获取客户端 IP 地址,我使用了 X-Forwarded-For,并从列表中获取第一个 IP 地址(根据我找到的信息,有一个客户端,代理 1、代理 2 ..)。但
我有一个场景,我想使用 Context.Forward 将上下文转发到另一个对话框,它工作得很好。现在,如果我更新代码以获取对话框堆栈并使用 DialogStack.Forward,则会导致 Stac
我遇到了 std::forward 的两种变体与可变参数模板参数一起使用。 template void foo(Args&&... arga) { bar(std::forward(args
考虑 std::apply 的可能实现: namespace detail { template constexpr decltype(auto) apply_impl(F &&f, Tuple &
我在 Foo Controller 中有一个需要参数的 Action 方法: public function fooAction($one, $two) { $a = one; $b
这些功能是否等效? template void foo(T && t) { bar(std::forward(t)); } template void foo2(T && t) {
在建立从 Fedora 23 到 Centos 7 的 ssh 连接时,我遇到了一个不幸的问题。命令 ssh -X user@centos7和 ssh -Y user@centos7都打印 警告:没有
作为从 Struts 1.x 迁移到 Spring Boot 的一部分,我一直在努力正确转发应有的信息。 最初的 Struts 版本依赖于 web.xml,尽管我想将该项目转换为更新的、完全基于 Ja
我使用了net = cv2.dnn.readNetFromCaffe(protoFile, WeightsFile),然后循环播放实时视频帧以使用net.forward()") bre
我注册了域名 www.a.com 然后我将屏蔽(使用 GoDaddy)流量从 www.a.com 转发到 www.really.long.url.com,因此用户在访问我的网站时只会在地址栏中看到 w
我有一个域,例如 domain.org以及地址为 http://server/node/myname 的服务器上的托管空间. 我如何映射 domain.org至 http://server/node/
我有jsp,具体取决于我正在转发到另一个页面的某些条件。 我有/myjsp/first.jsp 其代码如下, 在这段代码中,if flow come to else 条件控
前向声明和前向引用有什么区别? 在我看来,前向声明是当你声明一个尚未实现的函数时,但这不正确吗?您是否必须查看特定情况以声明案例“前向引用”或“前向声明”? 最佳答案 一个 前向声明是在实现和使用方法
我是一名优秀的程序员,十分优秀!