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操作一次就可以了

相关推荐
vistaup9 小时前
windows git 更新当前目录下所有的文件(非递归)
windows·git
王码码20359 小时前
Flutter for OpenHarmony:Flutter 三方库 algoliasearch 毫秒级云端搜索体验(云原生搜索引擎)
android·前端·git·flutter·搜索引擎·云原生·harmonyos
Irene199113 小时前
Git 命令汇总表(基于一次完整的 Git 实战经验整理,涵盖从安装配置到日常开发、问题排查的所有常用命令)
git·常用命令
q54314708714 小时前
Redis Desktop Manager(Redis可视化工具)安装及使用详细教程
redis·git·bootstrap
素雨迁喜15 小时前
Linux平台下git工具的使用
linux·运维·git
Irene199117 小时前
Windows环境,VS Code 中 Git 配置指南
git·基础配置
Yang-Never18 小时前
AI Code -> Windows电脑安装Claude
开发语言·windows·git
Irene199118 小时前
2026 前端开发 Windows 安装 Git 配置指南(有实际安装过程参考:适配版本 the latest 2.53.0(2) x64 )
前端·windows·git
早起的年轻人19 小时前
告别Git仓库臃肿:一招解决Maven target目录误提交问题
java·git·maven
悠然大月季1 天前
git 怎么导出提交历史,文件是乱码
git·git导出历史记录·git导出历史乱码