git rebase回退到根

项目初始有2个commit,git rebase -i 合并提交记录只能看到一个最新的,

需要git rebase -i --root才能看到第一个提交

git rebase -i -root以后,编辑提交信息,然后就可以了。

之前本地调试的时候经过多次实验性操作,导致git rebase -i -root以后,

查看git stash 是 Not currently on any branch

*(no branch)

master

这样,解决方法是

git branch temp 新建个分支

git checkout master

git branch -D temp 强制删除了temp分支,

然后再git rebase -i -root操作一次就可以了

相关推荐
007张三丰39 分钟前
git中的SSH 公钥配置详细指南(GitHub、GitLab、Gitee平台适用)
git·ssh·github
yue0082 小时前
git使用
git
tianlebest2 小时前
git action
大数据·git·elasticsearch
花间相见5 小时前
【JAVA开发】—— Git常用操作
java·开发语言·git
liu_sir_6 小时前
android9.0 amlogic 遥控器POWER按键的假待机的实现
开发语言·git·python
Gazer_S6 小时前
【Git 操作指南:分支同步与冲突批量解决】
大数据·git·elasticsearch
007张三丰6 小时前
Git 常用使用规范与高效技巧
大数据·git·elasticsearch
进击的小头7 小时前
Git在C项目中的分支策略和规范
c语言·开发语言·git
CCPC不拿奖不改名7 小时前
Git 核心操作命令
人工智能·git·python·rnn·自然语言处理·josn
weixin_4454766816 小时前
Git Cherry-pick & Clean Push 解决方案
git