首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >GIT - HEAD 1提前承诺

GIT - HEAD 1提前承诺
EN

Stack Overflow用户
提问于 2022-04-14 14:49:59
回答 1查看 40关注 0票数 -1

我有以下信息:

fatal: Not possible to fast-forward, aborting.

当尝试做GIT PULL

我做了GIT REBASE,它的工作是拉远程提交到分支,但头仍然没有指向分支!?

我想先把承诺合并到分支机构。(生产服务器)

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2022-04-19 09:58:41

我可以做以下事情来解决我的案子:

代码语言:javascript
复制
$git checkout –b temp #makes a new branch from current detached HEAD
$git branch –f master temp #update master to point to the new <temp> branch
$git branch –d temp #delete the <temp> branch
$git push origin master #push the re-established history

这两个分支现在都与HEAD合并了。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/71873549

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档